ios::rdstate

Syntax

int rdstate() const;

Remarks

Returns the current error state as specified by the following masks (ios enumerators):

Value Meaning

ios::goodbit No error condition
ios::eofbit End of file reached
ios::failbit A possibly recoverable formatting or conversion error
ios::badbit A severe I/O error or unknown state

The returned value can be tested against a mask with the AND (&) operator.

See Also

ios::clear