C++ – Basic Statement

To start work on C++ you need:
– One ‘text editor’ for programmers as Visual Studio on windows or Code::Blocks on Unbuntu
– A compiler to build the executable program

The Basic statement:


// This is a single line comment in C++

/* 
This is a multiline comment in C++
*/

/*  Prepocessor
It will be interpreted before the compilation of the program itself begins
Inclusion of iostream allow to perform standard input and output operations
*/
#include <iostream>

// Introduce visibility of 'cout' components,
// without this declaration 'cout' does not work
using namespace std;

//  It is the first function called when the program is run
int main()
{
    // character output - text - endline
    cout << "Hello world!" << endl;
    cout << "It is beautiful day!" << endl; 

    // terminate the program
    return 0; 
}