int rdstate() const;
Return Value
Returns the current error state as specified by the following masks (ios enumerators):
The returned value can be tested against a mask with the AND (&) operator.
ios Overview | Abstract Stream Base Class
See Also ios::clear