Mail Archives: djgpp/1996/04/24/01:29:03
At 08:35 PM 4/23/96 GMT, Gregory Fedor wrote:
>I wrote some simple code that utilizes the gotoxy() and printf()
>statements to place text on the screen, ala:
>[SNIP]
>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.
I beleive that it *is* getting buffered (I ran into the same problem
doing some stuff in C++, and I ended up doing a cout.flush() whenever
I needed to ensure that output appeared on the screen) There may well
be a better solution than flushing each time, probably turning off the
4k buffer, check the FAQ for possible info.
Ian
vmeister AT ios DOT com
http://ios.com/~vmeister/
- Raw text -