Actually, you probably just need to flush the output buffer.
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
system("pause");
return 0;
}
Whenever you're done writing to any form of file or buffer you need to flush it as soon as you're done. Which is what "endl" does.