delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/08/10:10:31

Sender: "Rolf Campbell" <cp1v45 AT nortelnetworks DOT com>
Message-ID: <3784B09D.A6A0739E@americasm01.nt.com>
Date: Thu, 08 Jul 1999 10:07:25 -0400
From: "Rolf Campbell" <cp1v45 AT nortelnetworks DOT com>
Organization: Nortel Networks
X-Mailer: Mozilla 4.6 [en] (X11; I; HP-UX B.10.20 9000/712)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
Subject: Re: Flushing input stream?
References: <01bec8b5$11218dc0$LocalHost AT thendren>
X-Orig: <cp1v45 AT americasm01 DOT nt DOT com>
Reply-To: djgpp AT delorie DOT com

Christopher Nelson wrote:

> >In Turbo C, a convenient, though non-standard, way is to fflush(stdin),
> >which will
> >discard all the pending characters in the standard input. How do I
> >achieve this in DJGPP?
>     while(getc()!=EOF);

    This will discard the rest of stdin, not just the current contents of
the buffer.

--
     -Rolf Campbell (39)3-6318



- Raw text -


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