User Program Communication
Output in C++
Used to output directly to the screen using the header file.
cout << "Text"; cout << outputData;
<< sends data to cout, which is the standard output stream. Multiple items can be chained onto cout. cout needs to be the first item in the chain.
cout is part of the std namespace. This means that you must either use std::cout if the namespace isn't used.
using namespace std; String name = "Bjarne"; cout << "Hello, " << name << "!"; //will output Hello, Bjarne!
Basic Input/Output - C++ Reference