Can anyone tell me what cin.ignore does?
Can anyone tell me what cin.ignore does?
If your question is this generic, ask google.
http://www.google.com/search?q=cin.i...utf-8&oe=utf-8
it ignores characters in a file up until a certain condition is met
istream& ignore(streamsize num=1, int_type delim=EOF);
is the basic prototype so the following calls are valid:
x.ignore();
(ignores a single character unless it is EOF)
x.ignore(1000);
(ignores 1000 characters unless it encounters EOF)
x.ignore(10,'*');
(ignores 10 characters unless it encounters an asterik (*) first)
I have found that this can be useful for finding the first [ in a file for ini editing classes and such. Also if you use a special character to signify something in a text file you can easily skip over useless text and go straight to your data.
(btw if you ever need to know a certain function prototype i have tons of books and help files laying around so you could just email me [email protected])