delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/08/03:04:11

From: Tim <tanyongj AT iscs DOT nus DOT edu DOT sg>
Newsgroups: comp.os.msdos.djgpp
Subject: fflush
Date: 5 Sep 1997 17:16:36 GMT
Organization: The Fun House
Lines: 22
Sender: Tim <tanyongj AT decunx DOT iscs DOT nus DOT sg>
Message-ID: <5upepk$cto@nuscc.nus.sg>
NNTP-Posting-Host: tanyongj AT decunx DOT iscs DOT nus DOT sg
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I use gcc both on unix and in djgpp. When I'm working on unix, the
following code to read in a character works. 

ch = getchar();
fflush(stdin);

however, in djgpp, fflush doesn't work, so the next line reads in the
carriage return and utterly ruins my work. 

Why doesn't fflush work here?

Please mail me, because I can't keep track of all the postings here.

TIA.

                                           Tim

--------- Web : http://mailhost.net/~ttimothy/ ---------
       E-mail : ttimothy AT mailhost DOT net          

                     @>--;----

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019