C++Syntax
Print to Console
Code example
std::cout << "Hello" << std::endl;Prints to standard output.
In C++, print to console: prints to standard output — std::cout << "Hello" << std::endl;
std::cout << "Hello" << std::endl;std::cout << "Hello" << std::endl;Prints to standard output.
Use std::cout << "Hello" << std::endl;.
Use this pattern: std::cout << "Hello" << std::endl;
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.