Half of the code you typed is C, and the other half is C++. Here is what you need to print Hello World on the screen:
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!";
system("pause");
return 0;
}
Without the system("pause"); it will close in one second in a win32 environment.