From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: flushing buffers Date: Wed, 27 Nov 1996 20:02:06 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 18 Message-ID: <329D0EBE.4F52@cs.com> References: Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp105.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit DJ-Gateway: from newsgroup comp.os.msdos.djgpp Apparently-To: djgpp AT delorie DOT com tehmul%NIITPUN AT iris DOT ernet DOT in wrote: > > I had the same problem. ANSI doesn't define fflush on input streams which is > why the fflush didn't work. Use rewind( stdin ) instead of fflush( stdin ). > That ought to cure your woes. I didn't know that rewind() was defined on stdin... but the libc docs show rewind( stdin ) as its example! Is this ANSI-compliant behavior? -- John M. Aldrich, aka Fighteer I -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W++ N++ o+ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------