Basic Hello world program in C++

In this tutorial, we are going to see the basic hello world program in C++

#include<iostream>
using namespace std;
int main()
{
std::cout<<"hello world without namespaces"<<std::endl;
cout<<"hello world with namespaces"<<endl;

return 0;
}
___________________________________________________________________
OUTPUT:
hello world without namespaces hello world with namespaces


  • As we can see in this program despite using any of the syntaxes we get the same output
  • In the following tutorials, we are going to make use of the standard namespaces so that we do not have to write extra lines of code (std::)