|
istream::istreamconstructor member
explicit istream (streambuf * sb); Construct object Constructs an object, assigning initial values to the base class by calling the inherited member ios::init with sb as parameter.Parameters
Return ValueNone (constructor).Example
This code uses a filebuf object (derived from streambuf) to open the file test.txt. The buffer is passed as parameter to the constructor of the istream object is, associating it to the stream. Then the first character is read and sent to the standard output stream cout. Objects of class istream are seldom constructed directly. Generally some derived class is used (like the standard ones ifstream and istringstream). Basic template member declaration( basic_istream<charT,traits> )
See also
|