1.4) Your First C++ Program: Writing To An Output Stream
This is the relevant program statement:
cout << "Hello World!" << endl;
Explanation
cout
is an output stream (anostream
object) representing console output - i.e., the terminal window from which the program was run<<
is the stream insertion operator
- The data to be inserted appears on the right
- The
ostream
object to the left is the destination for the data
endl
is a stream manipulator that sends OS-dependent line ending characters to an output stream and then flushes the output buffer so that pending output appears at its destination