User Program Communication
Output in C++
Used to output directly to the screen using the header file.
Syntax
cout << "Text";
cout << outputData;
Notes
<< 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.
Example
using namespace std;
String name = "Bjarne";
cout << "Hello, " << name << "!"; //will output Hello, Bjarne!