For formatted input operations, cin
is used together with the extraction operator, which is written as >>
(i.e., two "greater than" signs). This operator is then followed by the variable where the extracted data is stored. For example:
For formatted output operations, cout
is used together with the insertion operator, which is written as <<
(i.e., two "less than" signs).