<<< First C++ program, cont. | Index | First C++ program, cont. >>> |
#include <iostream>
int main()
{
std::cout << "Hello, World!";
return 0;
}
Statement std::cout << "Hello, World!"; sends quoted string of characters to console output device, namely cout.
Because cout is an object that comes from C++ standard library, it is prefixed by the namespace of the standard library, std::
Our program communicates with cout by using stream output operator << in order to print text on computer screen.
<<< First C++ program, cont. | Index | First C++ program, cont. >>> |