From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: Flusing keyboard buffer Date: Sat, 27 Feb 1999 15:12:07 -0400 Organization: BrunNet Lines: 31 Message-ID: <36D84387.90D723E2@unb.ca> References: <36A20566 DOT 3251 AT magicsoftware DOT freeserve DOT co DOT uk> NNTP-Posting-Host: ftnts4c61.brunnet.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Simon wrote: > Eli Zaretskii wrote: > > > > On Sat, 16 Jan 1999, Simon wrote: > > > > > Can anyone tell me a function that will remove all unfetched > > > key strokes from the keyboard buffer ! > > > > Here's one possible way: > > > > while (kbhit ()) > > getkey (); > > Sorry It does do what I want, I just though there may have been a > specific function to do it > Thanks for your help! > Simon You can use: rewind(stdin); That should kill the pending keystrokes in one function call. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlisnis AT BrunNet DOT Net Endlisnis AT HotMail DOT com