I decided to make some c++ tutorials.
This is for beginners, an hello world application
Before we start make sure you have installed Dev Cpp (compiler).
In cpp we start with:
#include <iostream>
This include an c++ library.
using namespace std;
This must be included to use the print functions(i/o) cout and cin
int main(){
#code here
}
this is a function but not just an however function because it telle to the compiler that this is the main of our code, where the compiler should start.
To print something we must use cout just like this
cout << "Hello world!";
this print hello world on the cmd (command line).
But the cmd gets closed! yes it executes and the gets closed.
To stop that we must add:
system("pause");
Ok stop talking! Lets get into real coding:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
system("pause");
}
And what it prints is:
Hope this tutorial helped you, and dont forget to share :)
