A Basic Program

#include <iostream.h>
void main()
{
  cout<<"hello";
}

When you compile this you will get no error but after you run it by ctrl+F9 you will see the program opens and ends instantly.

WHY? What happens to the program?
Because there is nothing added in the program that tells it to wait for you to see it.
Try this..
#include <iostream.h>
#include <conio.h>
void main()
{
  cout<<"hello";
  getch();
}
Now you can see Hello printed on the screen
c++ source codes