My programs prompts and intermediate output dont always show up on the screen ...

Q

My program's prompts and intermediate output don't always show up on the screen, especially when I pipe the output through another program.

✍: Guest

A

It's best to use an explicit fflush(stdout) whenever output should definitely be visible (and especially if the text does not end with \n). Several mechanisms attempt to perform the fflush for you, at the ``right time,'' but they tend to apply only when stdout is an interactive terminal.

2015-11-11, 434👍, 0💬