G
galapogos
Hi,
I'm trying to prompt a user to press enter to continue by calling
getchar(), but if the user types in some random string, it messes up
my program since I have a do-while loop that calls getchar() later on
for user input. How do I clear the stdin to prevent this?
Thanks.
I'm trying to prompt a user to press enter to continue by calling
getchar(), but if the user types in some random string, it messes up
my program since I have a do-while loop that calls getchar() later on
for user input. How do I clear the stdin to prevent this?
Thanks.