Clears all error flags.
- _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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback