Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!ucbvax!ENUXHA.EAS.ASU.EDU!trotter From: trotter@ENUXHA.EAS.ASU.EDU (Russell "Bithead" Trotter) Newsgroups: comp.lang.c Subject: Clearing the stdin buffer Message-ID: <9106301609.AA05714@enuxha.eas.asu.edu> Date: 30 Jun 91 16:09:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: trotter@enuxha.eas.asu.edu (Russell "Bithead" Trotter) Organization: Arizona State Univ, Tempe AZ Lines: 7 Is there a way to clear the stdin buffer? My main goal is to clear out extraneous characters in the input buffer so when I make calls to getchar() ..etc I read from the keyboard and not pick up unwanted chars. I've tried fflush(stdin) but that doesn't seem to work. Any help would be greatly appreciated. Thank you.