GNU Info

Info Node: (iostream-295.info)Iostream

(iostream-295.info)Iostream


Prev: Istream Up: Streams
Enter node , (file) or (file)node

Input and output together: class `iostream'
===========================================

   If you need to use the same stream for input and output, you can use
an object of the class `iostream', which is derived from _both_
`istream' and `ostream'.

   The constructors for `iostream' behave just like the constructors
for `istream'.

 - Constructor:  iostream::iostream ()
     When used without arguments, the `iostream' constructor simply
     allocates a new `ios' object, and initializes the input counter
     (the value reported by `istream::gcount') to `0'.

 - Constructor:  iostream::iostream (streambuf* SB [, ostream* TIE])
     You can also call a constructor with one or two arguments.  The
     first argument SB is a `streambuf*'; if you supply this pointer,
     the constructor uses that `streambuf' for input and output.

     You can use the optional second argument TIE (an `ostream*') to
     specify a related output stream as the initial value for
     `ios::tie'.

   As for `ostream' and `istream', `iostream' simply uses the `ios'
destructor.  However, an `iostream' is not deleted by its destructor.

   You can use all the `istream', `ostream', and `ios' methods with an
`iostream' object.


automatically generated by info2www version 1.2.2.9