This documentation is archived and is not being maintained.


Clears all error flags.

void clear(
   iostate _State=goodbit


_State (optional)

The flags you want to set after clearing all flags.

The flags are goodbit, failbit, eofbit, and badbit. Test for these flags with good, bad, eof, and fail

The member function replaces the stored stream state information with

_State | (rdbuf != 0 ? goodbit : badbit)

If _State & exceptions is nonzero, it then throws an object of class failure.

See rdstate for an example of using clear.

Header: <ios>