Electrical and Computer Engineering
33 of 37
UAH
CPE 112
Skipping Characters
with the ignore Function
•The ignore function is used to skip charac-ters in the input stream.
•It’s a function with two arguments
– cin.ignore(200, ‘\n’);
•The first argument is int, the second char. This statement says skip 200 characters or skip until you reach a newline character.