From: Logan Bowers Newsgroups: comp.os.msdos.djgpp Subject: Re: TCP/IP Library, Svasync Library, and a Stdout that won't flush Date: Tue, 11 Feb 1997 19:57:09 -0800 Organization: Cyberspace.com Lines: 37 Message-ID: <33013F95.5F30@juno.com> References: <32FE32DF DOT 0 AT cyberspace DOT com> <5dr5ki$8qs AT flex DOT uunet DOT pipex DOT com> Reply-To: LegoB AT juno DOT com NNTP-Posting-Host: PPP206-108.cyberspace.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp nikki wrote: > > > This may seem pretty lame, but I cannot figure out how to flush the > > stdout. When I call fflush(stdout), I know there is stuff in the > > buffer, but it doesn't display on the screen. What am I to do? > > this should work, eg something of the form > > printf("hello"); > fflush(stdout); > > would print hello out. perhaps you've redirected stdout? or perhaps you're > not writing the data to stdout but stderr or somewhere weird? > > regards, > nik > > -- > Graham Tootell > nikki AT gameboutique DOT com Ok, I have stdout working right (one of the variants of the code didn't use stdout right), but currently, I'm having toruble getting input. Here is where I am having the trouble: fflush(stdout);fflush(stdin); printf("Analyze (C)ompressed or (U)ncompressed file? "); fflush(stdout); option = getchar(); 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? Thanks. Logan Bowers