simple c++ program to display hello world code example
Example 1: hello world c++
#include <iostream>
int main(){
std::cout <<"Hello World" << std::endl;
return 0;
}
Example 2: hello world in c++
#include <iostream>
// Anything in the main function will get executed even without calling it.
int main(){
// The function cout in the STD or Standard Library will print out stuff to the console.
std::cout <<"Hello world.";
}