Share via


istream_withassign

#include <iostream.h>

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. For example, a program that normally expects input from stdin 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.

Construction/Destruction — Public Members

istream_withassign

Constructs an istream_withassign object.

~istream_withassign

Destroys an istream_withassign object.

Operators — Public Members

operator =

Indicates an assignment operator.

Input Stream Classes

See Also   ostream_withassign