Mail Archives: djgpp/1997/02/13/10:56:33
On Tue, 11 Feb 1997, Logan Bowers wrote:
> The coputer doesn't wait, but continues on even though I flushed the
> stdin. Is there any other function I need call, or some little detail
> I'm missing?
ANSI C standard says `fflush' effect on stdin is undefined. In DJGPP, it
does nothing. So if stdin has some characters pending, `getchar' will
pick them.
The best way to handle screen I/O is to use screen-oriented functions
(cputs and cprintf for output, cgets and getch for input). Look them up
in the library reference.
- Raw text -