public member function
Check whether badbit is set
true if the badbit error state flag is set for the stream.
This flag is set by operations performed on the stream when an error occurs while read or writing data, generally causing the loss of integrity of the stream.
Notice that this function is not the exact opposite of good, which checks whether none of the error flags (eofbit, failbit and badbit) are set, and not only badbit:
eofbit, failbit and badbit are member constants with implementation-defined values that can be combined (as if with the bitwise OR operator).
|indicates||functions to check state flags|
|goodbit||No errors (zero value iostate)|
|eofbit||End-of-File reached on input operation|
|failbit||Logical error on i/o operation|
|badbit||Read/writing error on i/o operation|
goodbit is zero, indicating that none of the other bits is set.
true if the stream's badbit error state flag is set.
Accesses the stream object.
Concurrent access to the same stream object may cause data races.
Strong guarantee: if an exception is thrown, there are no changes in the stream.
- Check whether state of stream is good (public member function)
- Check whether either failbit or badbit is set (public member function)
- Check whether eofbit is set (public member function)
- Get error state flags (public member function)
- Set error state flags (public member function)