Structure of a Basic C++ Program Before understanding the syntax of the C++, let’s see a sample program which can help in understanding the basic structure of the C++ program and some important main lines which should be included in the program always.
using namespace std;
cout << “Hello World”;
/* Output would be like the following
Hello World */
First line (#include <iostream>) of the program starts with a hash sign (#). Lines which begin with # sign are directives read which are known as a preprocessor. These lines are important. In this case, #include <iostream> gives the instruction to the preprocessor to include a section of standard C++ code which is known as header iostream. This header isRead More →