Hello, I am trying to avoid using the cin.ignore() function. How would I write a line(s) that does the same purpose as cin.ignore()? I know what the cin.ignore() command does but I am just trying to think of an alternative way to write it.

Thanks for any help.
But get() doesn't necessarily do the right thing.

The best way is to put it all in a single routine, which you call to obtain input. For example:
(These days you can get rid of the word "mutable" on line 10.)

Topic archived. No new replies allowed.