Wow...this is interesting:What in the world does that do?Code:cin.ignore(cin.rdbuf()->in_avail()+1);
Wow...this is interesting:What in the world does that do?Code:cin.ignore(cin.rdbuf()->in_avail()+1);
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
It's a funny little 'look what I can do trick' that seems to come around some times. I think it will pause the program until it reads a line, and discard all the input that was on that line.