Program exits as soon as started.

Well, hey guys, I have a bit of an issue, whenever I start my simple hello world application,
1
2
3
4
5
6
#include <iostream>
int main()
{
  cout << "Hello World!";
  return 0;
}

it just closes less than a second after I open it. And is there anyway I could attach a C++ program to a java chatbox? (Its for an idea where I say "screenshot" and it uploads a pic that it just took with printscreen)
If you want to keep your console going, read a bit of this:
http://www.cplusplus.com/forum/beginner/1988/
Thanks for the help, seems to have fixed my problem!
You can also avoid that by running the program from the command line, which you can get to by opening "run" and typing "cmd".
Topic archived. No new replies allowed.