Thread
:
C++ equivalent of fflush(stdin); ?
View Single Post
#
4
(
permalink
)
January 9th, 2008, 03:55 PM
sudobash
Registered User
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
this seems to be working for me right now in Ubuntu 7.10:
void flush()
{
char nextChar;
while( nextChar != '\n' && nextChar != EOF)
{nextChar = cin.get();}
}
may have to play around with where you call the function...
sudobash
View Public Profile
Find all posts by sudobash