state flags
The eof, fail, and bad bits a stream uses to report problems.
A stream's state is goodbit or some combination of eofbit (input ended), failbit (a read produced no value), and badbit (a serious I/O error); a failed stream tests false.