I'm sorry for Yet Another Stupid Question on C programming in Linux (
I'm aware that this is not the main purpose of this list but I
appreciate somebody could answer to this).

What function can I use to clean the getchar() buffer before taking
another var. Let me explain this better: In my program I'm taking the
user decision to continue or not in 2 or 3 functions. In the first
user's input it works fine, but from now on it seems like the getchar()
buffer takes the value of '\n' from the last input. So I was reading in
a web page about a function to clean the buffer but it didn't mention
the actual name of the function.

Does anybody know the name or another way to do this?

Reply via email to