[comp.lang.c] Clearing the stdin buffer

trotter@ENUXHA.EAS.ASU.EDU (Russell "Bithead" Trotter) (06/30/91)

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.