Standard C++ Library Reference ISO/IEC (VERSION3)
ios_base::iostate
typedef T2 iostate;
static const iostate badbit, eofbit, failbit, goodbit;
The type is a bitmask type T2 that describes an object that can store stream state information. The
distinct flag values (elements) are:
badbit, to record a loss of integrity of the stream buffer●
eofbit, to record end-of-file while extracting from a stream●
failbit, to record a failure to extract a valid field from a stream●
In addition, a useful value is:
goodbit, no bits set●
ios_base::iword
long& iword(int idx);
The member function returns a reference to element idx of the extensible array with elements of
type long. All elements are effectively present and initially store the value zero. The returned
reference is invalid after the next call to iword for the object, after the object is altered by a call to
basic_ios::copyfmt, or after the object is destroyed.
If idx is negative, or if unique storage is unavailable for the element, the function calls
setstate(badbit) and returns a reference that might not be unique.
To obtain a unique index, for use across all objects of type ios_base, call xalloc.
ios_base::openmode
typedef T3 openmode;
static const openmode app, ate, binary, in, out, trunc;
The type is a bitmask type T3 that describes an object that can store the opening mode for several
iostreams objects. The distinct flag values (elements) are:
app, to seek to the end of a stream before each insertion●
ate, to seek to the end of a stream when its controlling object is first created●
binary, to read a file as a binary stream, rather than as a text stream●
in, to permit extraction from a stream●
out, to permit insertion to a stream●
trunc, to truncate an existing file when its controlling object is first created●