cout
The standard output stream object. Used with the << insertion operator to write to the console.
Syntax
cpp
std::cout << value << std::endl;Example
cpp
#include <iostream>
using namespace std;
cout << "Hello, World!" << endl;
cout << "Value: " << 42 << "\n";
cout << "Pi: " << fixed << setprecision(2) << 3.14159;