ios::tie

ostream* tie( ostream* pos );

ostream* tie() const;

Return Value

The first overloaded tie function ties this stream to the specified ostream and returns the value of the previous tie pointer or NULL if this stream was not previously tied. A stream tie enables automatic flushing of the ostream when more characters are needed, or there are characters to be consumed.

By default, cin is initially tied to cout so that attempts to get more characters from standard input may result in flushing standard output. In addition, cerr and clog are tied to cout by default.

The second function returns the value of the previous tie pointer or NULL if this stream was not previously tied.

Parameter

pos

A pointer to an ostream object.

ios OverviewAbstract Stream Base Class