Found in iostream.h
, this C++
command is used to output stuff to the screen.
cout << "Hello, World!";
To output a variable you do
cout << varname;
and to do a variable and string together you do
cout << "Hello, World! My favourite number is " << varname << ". I also like cheese.";
This, of course, assumes that you like cheese (surely you do!) and that varname contains your favourite number.