Defined Terms
condition state Flags and associated functions usable by any of the stream classes that indicate whether a given stream is usable.
file mode Flags defined by the
fstream
classes that are specified when opening a file and control how a file can be used.file stream Stream object that reads or writes a named file. In addition to the normal
iostream
operations, file streams also defineopen
andclose
members. Theopen
member takes astring
or a C-style character string that names the file to open and an optional open mode argument. Theclose
member closes the file to which the stream is attached. It must be called before another file can beopen
ed.fstream File stream that reads and writes to the same file. By default
fstream
s are opened within
andout
mode set.ifstream File stream that reads an input file. By default
ifstream
s are opened within
mode set.inheritance Programming feature that lets a type inherit the interface of another type. The
ifstream
andistringstream
classes inherit fromistream
and theofstream
andostringstream
classes inherit fromostream
. Chapter 15 covers inheritance.istringstream String stream that reads a given
string
.ofstream File stream that writes to an output file. By default,
ofstream
s are opened without
mode set.ostringstream String stream that writes to a given
string
.string stream Stream object that reads or writes a
string
. In addition to the normaliostream
operations, string streams define an overloaded member namedstr
. Callingstr
with no arguments returns thestring
to which the string stream is attached. Calling it with astring
attaches the string stream to a copy of thatstring
.stringstream String stream that reads and writes to a given
string
.