Check if either failbit or badbit is set
The function returns true if either the failbit or the badbit is set. At least one of these flags is set when some error other than reaching the End-Of-File occurs during an input operation.
failbit is generally set by an input operation when the error was related to the internal logic of the operation itself, so other operations on the stream may be possible. While badbit is generally set when the error involves the loss of integrity of the stream, which is likely to persist even if a different operation is performed on the stream. badbit can be checked independently by calling member function bad.
This function behaves like operator!.
Parameters
none
Return Value
true if badbit and/or failbit are set.
false otherwise.
Basic template member declaration
( basic_ios<charT,traits> )
See also
ios::good | Check if the state of the stream is good for i/o operations. (public member function) |
ios::bad | Check if badbit is set (public member function) |
ios::eof | Check if eofbit is set (public member function) |
ios::clear | Set error state flags (public member function) |
|