bad

Syntax:

    bool stream::bad();

The bad() function returns true if a fatal error with the current stream has occurred, false otherwise.

Note: fatal errors do not normally occur. Even a failure to open a file is not a fatal error.

Related Topics: clear, eof, exceptions, fail, good, rdstate

Stream states: