Parameters
noneReturn Value
The value of the next character.In the case of error, the function returns EOF (or traits::eof() for other traits) and modifies the state flags accordingly:
| flag | error |
|---|---|
| eofbit | The end of the source of characters is reached during its operations. |
| failbit | - |
| badbit | An error other than the above happened. |
Additionaly, in any of these cases, if the appropriate flag has been set with member function ios::exceptions, an exception of type ios_base::failure is thrown.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
Basic template member declaration
( basic_istream<charT,traits> )| 1 2 |
|
See also
| istream::get | Get unformatted data from stream (public member function) |
| istream::operator>> | Extract formatted data (public member function) |
