Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
ios_base
ios_base::ios_base
ios_base::~ios_base
member classes:
ios_base::failure
ios_base::Init
member functions:
ios_base::flags
ios_base::getloc
ios_base::imbue
ios_base::iword
ios_base::precision
ios_base::pword
ios_base::register_callback
ios_base::setf
ios_base::sync_with_stdio
ios_base::unsetf
ios_base::width
ios_base::xalloc
member types:
ios_base::event
ios_base::event_callback
ios_base::fmtflags
ios_base::iostate
ios_base::openmode
ios_base::seekdir


ios_base::iostate

public member type

Type for stream state flags

Bitmask type to represent stream error state flags.

This type is used as its parameter and/or return value by the member functions of the ios class.

All stream objects keep internally information on the state of the object that can be retrieved as an element of this type by calling member function ios::rdstate or set by calling ios::setstate.

The values passed and retrieved by these functions can be any valid combination (using the boolean or operator, "|") of the following member constants:


flag valueindicates
eofbitEnd-Of-File reached while performing an extracting operation on an input stream.
failbitThe last input operation failed because of an error related to the internal logic of the operation itself.
badbitError due to the failure of an input/output operation on the stream buffer.
goodbitNo error. Represents the absence of all the above (the value zero).

These constants are defined in the ios_base class as public members. Therefore, they can be refered to either directly by their name as ios_base members (like ios_base::badbit) or by using any of their inherited classes or instantiated objects, like for example ios::eofbit or cin.goodbit.

See also