Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

(C++) std::cout

 

std::cout is used to write text to screen. std::cout is a global std::ostream.

 

Different elements are sent to the stream using the stream out operator, <<.

 

std::cout is defined in the header file iostream and resides is namespace std.

 

 

 

#include <iostream>

 

int main()

{

  std::cout << "Hello World\n";

}

 

 

This results in the following output on the screen:

 

Hello World

 

 

 

 

 

std::cout code snippets

* std::cout on a std::vector

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.