std::basic_istream::ignore
From Cppreference
< cpp | io | basic istream
C++ Standard Library | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Input/output library | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::basic_istream | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
basic_istream& ignore();
|
(1) | |
basic_istream& ignore( pos_type count );
|
(2) | |
basic_istream& ignore( pos_type count, char_type delim );
|
(3) | |
Extracts and discards characters from the input stream. For all versions if good() != true, setstate(failbit) is called and the function returns. If end-of-file occurs, setstate(eofbit) is called and the function returns.
1) ignores and discards one character
2) ignores and discards up to count characters
3) ignores and discards up to count characters. The operation is stopped when delim character is found in which case it is also extracted
Contents |
[edit] Parameters
count | - | number of characters to extract |
delim | - | delimiting character to stop the extraction at. It is also extracted. |
[edit] Return value
*this
[edit] Example
This section is incomplete |
[edit] See also
|
extracts characters (public member function) |
|
|
extracts characters until the given character is found (public member function) |