std::basic_istream::peek

From Cppreference

Jump to: navigation, search
basic_istream& unget();

Makes the last extracted character available again. Effectively calls rdbuf()->sungetc(). If good() != true, setstate(failbit) is called and the function returns.

Contents

[edit] Parameters

(none)

[edit] Return value

*this

[edit] Example

[edit] See also

get
extracts characters
(public member function)
peek
reads the next character without extracting it
(public member function)
putback
puts character into input stream
(public member function)