Mail Archives: djgpp/1997/03/09/13:53:18
On Sat, 8 Mar 1997 17:05:13 -0500 (EST) Guess <times9 AT clark DOT net> writes:
>-> ....
>-> printf("\nHello World");
>-> printf("\nSomething else...");
>-> clrscr();
>-> .....
>-> Then, it writes "Hello World", it clear the screen and, then, write
>-> "Something else". Why? (I compiled the from RHide).
>I think it's cause it's not flushing the output buffer.
>printf("\nsomething else...\n");
>clrscr();
This is exactly what is happening. I recommend you use cprintf().
It has the same function prototype, so use it as you would printf().
However, it is not buffered, so anything you print will be printed right
away.
|| Fwec AT juno DOT com
||
|| "Why can they make a potato chip in one second, but it takes us months
to
|| develop software?" - Dilbert's Boss
||
- Raw text -