Having a little trouble with cin.ignore.

Hello, I'm having a little bit of trouble, You see i can't figure out why in the following bit of code :
void quit()
{
cin.ignore("/n");
cin.get();
}
I'm getting the following error when i try to compile:
"invalid conversion from `const char*' to `int' "
Any help with this would be great.

Thanks, Morgan.
There is no such thing as '/n'. (Note: Single quotes)
You also have to specify a stream size or leave the parentheses blank
cin.ignore(10, '\n');



http://www.cplusplus.com/reference/iostream/istream/ignore.html
Last edited on
Thank you very much.
Topic archived. No new replies allowed.