#include <iostream.h>
As the iostream class hierarchy diagram shows, ios is the base class for all the input/output stream classes. While ios is not technically an abstract base class, you will not usually construct ios objects, nor will you derive classes directly from ios. Instead, you will use the derived classes istream and ostream or other derived classes.
Even though you will not use ios directly, you will be using many of the inherited member functions and data members described here. Remember that these inherited member function descriptions are not duplicated for derived classes.
Data Members (static) — Public Members
Mask for obtaining the conversion base flags (dec, oct, or hex).
Mask for obtaining the field padding flags (left, right, or internal).
Mask for obtaining the numeric format (scientific or fixed).
Construction/Destruction — Public Members
Constructor for use in derived classes.
Virtual destructor.
Flag and Format Access Functions — Public Members
Sets or reads the stream’s format flags.
Manipulates the stream’s format flags.
Clears the stream’s format flags.
Sets or reads the stream’s fill character.
Sets or reads the stream’s floating-point format display precision.
Sets or reads the stream’s output field width.
Status-Testing Functions — Public Members
Indicates good stream status.
Indicates a serious I/O error.
Indicates end of file.
Indicates a serious I/O error or a possibly recoverable I/O formatting error.
Returns the stream’s error flags.
Sets or clears the stream’s error flags.
User-Defined Format Flags — Public Members
Provides a mask for an unused format bit in the stream’s private flags variable (static function).
Provides an index to an unused word in an array reserved for special-purpose stream state variables (static function).
Converts the index provided by xalloc to a reference (valid only until the next xalloc).
Converts the index provided by xalloc to a pointer (valid only until the next xalloc).
Other Functions — Public Members
Controls the connection of streambuf deletion with ios destruction.
Gets the stream’s streambuf object.
Synchronizes the predefined objects cin, cout, cerr, and clog with the standard I/O system.
Ties a specified ostream to this stream.
Operators — Public Members
Converts a stream to a pointer that can be used only for error checking.
Returns a nonzero value if a stream I/O error occurs.
ios Manipulators
Causes the interpretation of subsequent fields in decimal format (the default mode).
Causes the interpretation of subsequent fields in hexadecimal format.
Causes the interpretation of subsequent fields in octal format.
Sets the stream’s mode to binary (stream must have an associated filebuf buffer).
Sets the stream’s mode to text, the default mode (stream must have an associated filebuf buffer).
Parameterized Manipulators
(#include <iomanip.h> required)
Sets the stream’s format flags.
Resets the stream’s format flags.
Sets the stream’s fill character.
Sets the stream’s floating-point display precision.
Sets the stream’s field width (for the next field only).