class istream_withassign : public istream

The istream_withassign class is a variant of istream that allows object assignment. The predefined object cin is an object of this class and thus may be reassigned at run time to a different istream object.

A program that normally expects input from stdin, for example, could be temporarily directed to accept its input from a disk file.

Predefined Objects

The cin object is a predefined object of class ostream_withassign. It is connected to stdin (standard input, file descriptor 0).

The objects cin, cerr, and clog are tied to cout so that use of any of these may cause cout to be flushed.

#include <iostream.h>

See Also

ostream_withassign