Sender: tim AT riker DOT skynet DOT be Message-ID: <3ADC5A6A.C9F50B46@falconsoft.be> Date: Tue, 17 Apr 2001 16:59:54 +0200 From: Tim Van Holder Organization: Falcon Software NV X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en, nl-BE, nl MIME-Version: 1.0 To: Michael Ahumibe CC: djgpp AT delorie DOT com Subject: Re: fflush (in djgpp) References: <9aqfuu$fnb$1 AT uranium DOT btinternet DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Michael Ahumibe wrote: > > Can someone tell me what's wrong? or if there is a work around. As said before fflush(stdin) isn't supposed to clear the input; I believe that's a Borlandism (or a Microsoftism, or both). But IIRC you can use the '%*c' specifier to read any number of characters (effectively clearing the input), without placing them into memory. So scanf ("%d%*c", &age) should read '20' into age and discard the rest. -- Tim Van Holder - Falcon Software N.V. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This message was posted using plain text. I do not endorse any products or services that may be hyperlinked to this message.