Check out example codes for "hello world c++". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>


int main(){
 std::cout <<"Hello World" << std::endl;
 return 0;
}

Code Example 2

#include <bits/stdc++.h>

using namespace std;

int main(){
	cout << "hello world! \n"; 
}                                                     //code by goukl aakash

Code Example 3

#include<iostream>
using namespace std;

int main(){
 
  cout << "Hello World" << endl;
  
  return 0;
}

Code Example 4

#include <iostream> // Include standard library and namespace
using namespace std; // for c++

int main () // where program starts
{
	cout << "Hello World!\n"; // cout (part of std) prints message
  	return 0; // return int because main is of type int
}

Code Example 5

#include <iostream>

using namespace std;

int main() {
 cout << "Hello World" << endl;		// endl = '\n'
 return 0;
}

Code Example 6

#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}

Learn ReactJs, React Native from akashmittal.com