-
SOLVED - cin problems
Hello,
In my program I use cin to get info from the user and later on I use cin.getline. My problem is that when a user choses something with the help of cin in the beginning, it seem to left something in the cin-queue so that it sends something to my cin.getline and I can't enter something there because it's already got an "input".
anyone care to help me with this?
thanks!
//alex
-
Using cin.ignore() should clear out the stream. I forget the exact way to use it, but I'm sure you'll get it.
:)
-
thanks
THank you!
it works great!