The GNU C++ Iostream Library - Istream

Node: Istream Next: Iostream Prev: Ostream Up: Streams

Managing input streams: class istream

Class istream objects are specialized for input; as for ostream , they are derived from ios , so you can use any of the general-purpose methods from that base class. Declarations for this class also come from `iostream.h'.

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

Constructor istream::istream (streambuf *sb [, ostream tie])
You can also call the 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. You can use the second optional argument tie to specify a related output stream as the initial value for ios::tie .

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

Char Input Reading one character.
String Input Reading strings.
Input Position Repositioning an istream.
Istream Housekeeping Miscellaneous istream utilities.


Next: Iostream Up: Streams