Hello World!!!

This is the first program I make with C++. It is very simple, and it’s like the “Ritual of Iniciation” in the programming world. You only have to understand simple concepts to make it happen.

For example, to print or read informatio during the execution of the program, you need to write the line #include <iostream> and to avoid write std::comand; (the part of std::) in each line and comand you want to execute, you just have to write using namespace std; .

It’s as simple as that. Now, to write anything you can use the comand cout << //what you want to print into ” “;

This is my Hello World! code:

#include <iostream>
using namespace std;

int main()
{
  cout << "Hello World!";
  std::cout << "/* message */" << '\n';
  return 0;
}

 

What is the yours?

Leave a comment