Mail Archives: djgpp/2000/04/04/16:44:58
Florent <florent AT oih DOT rwth-aachen DOT de> wrote:
[Hallo aus dem Aachener Physikzentrum! :-)]
> I went to a computering club and I aks some question about the
> function fflush. They told me that it doesn't work on MS-DOS or
> Windows environment but linux yes.
For the benefit of the RWTH Computerclub, I hope this stems in a
misunderstanding of their answer... it's wrong.
Anyway: it's generally exactly the other way round: the only platform
where fflush(stdin) ever did what you think it does is DOS. But not
DJGPP, only the older commercial 16bit C compilers, like Borland Turbo
C.
> Do I use the fflush function in a wrong way ? (I'm a bit newbye)
Yes. Definitely. fflush() is for output, only, not for input.
This is a C language issue, more than a DJGPP-specific one. The C
language newsgroups, and their FAQ, have more relevance to this.
> Or MS-DOS does not suport this kind of function ?
It's not exactly a question of the operating system (DOS vs. Linux),
but of the compiler and it's library and runtime system.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -