Hi and welcome to GeeksforGeeks, in this tutorial
we will learn how to write a simple Hello World program.
In C++, a simple comment line begins with // double forward slash.
And here, we are writing our first C++ program. After this, we have to include some libraries
which will help us write the program. The #include directive tells the compiler to include
a file. For a simple Hello world code, we just need input output stream library. So,
return type integer. Execution of every C++ program begins with the main() function, no
matter where the function is located in the program. So, every C++ program must have a
main() function. Then, we start writing the function by a opening
curly bracket and to end a function we have a closing bracket.
If we need to print something on we use the std::cout command. This line tells the compiler
to display the message “Hello World” on the screen. The std::cout is used to identify
the standard character output device which is usually the desktop screen. Everything
followed by the character “