From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: fflush ??? Date: 4 Apr 2000 19:14:42 GMT Organization: Aachen University of Technology (RWTH) Lines: 32 Message-ID: <8cdev2$m2s$1@nets3.rz.RWTH-Aachen.DE> References: <8cd85b$jag$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 954875682 22620 137.226.32.75 (4 Apr 2000 19:14:42 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 4 Apr 2000 19:14:42 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Florent 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.