Go to the first, previous, next, last section, table of contents.

Managing output streams: class ostream

Objects of class ostream inherit the generic methods from ios, and in addition have the following methods available. Declarations for this class come from `iostream.h'.

Constructor: ostream::ostream ()

The simplest form of the constructor for an ostream simply allocates a new ios object.

Constructor: ostream::ostream (streambuf* sb [, ostream tie])

This alternative constructor requires a first argument sb of type streambuf*, to use an existing open stream for output. It also accepts an optional second argument tie, to specify a related ostream* as the initial value for ios::tie.

If you give the ostream a streambuf explicitly, using this constructor, the sb is not destroyed (or deleted or closed) when the ostream is destroyed.


Go to the first, previous, next, last section, table of contents.