The C++ input-output system supports a hierarchy of classes that are used to manipulate both the console and disk files, called stream classes. The stream classes are implemented in a rather elaborate hierarchy.
The iostream facility of C++ provides an easy means to perform I/O. The class istream uses the predefined stream cin that can be used to read data from the standard input device. The extraction operator >>, is used to get data from a stream. The insertion operator <<, is used to output data into a stream.
A stream object must appear on the left side of the << or >> operator, however multiple stream operators can be concatenated on a single line, even when they refer to objects of different types.
No comments:
Post a Comment