Mail Archives: djgpp/1996/04/24/05:35:19
> I wrote some simple code that utilizes the gotoxy() and printf()
> statements to place text on the screen, ala:
>
> while(!done)
> {
> gotoxy(column, line);
> printf(" %... ", ...);
>
> // update column
> // update line
> }
>
> When I run this type of code nothing appears on the screen. I can see
> the cursor jumping around, but nothing else. However, if I include a
> '\n' in the printf statement, things display fine, *or* as soon as I
> printf with a '\n' outside the loop, then **all** the text gets
> displayed. It's almost as if it's being buffered, and isn't displayed
> until a '\n' comes along.
This is a normal printf behavior. I recommend to use cprintf with gotoxy,
since they both belong to conio, whereas printf is a stdio function.
- Raw text -