using namespace std;This tells the C++ compiler that it should use identifiers from the std library namespace. Without it, the first line in the main() block would need to be prefixed with std::.
std::cout << "Hello World";Without the namespace line, every instance of cout would need a std:: or else will not compile.
cout << "Hello World";The statement cout is the equivalent of printf in C. If you prefer to use printf then add the following line.
#include <stdio.h>and change the cout to
printf ("Hello World") ;C++ was designed to be compatible with c which is why printf() still works. You can use either. In a later tutorial, I will show all the formatting possibilities with cout.
On the next page : Another example

