.exe file opening and closing too fast?

Hey y'all,
I'm brand-new at coding and have just written my first .exe file. When I try to open it, though, the window pops up briefly on the screen and then suddenly goes away (too fast to even read what it says).

Here's what I put into my editor/ compiler (I use Dev c++ with ISO C++ 11 as my default setting):

#include <iostream>
int main ()
{
std:: string greeting = "hey bby";
std:: cout<< greeting << " <3 ";
return 0;
}


How do I correct this/ am I missing something? Thanks in advance. :)
Last edited on
Oh, additionally, it works just fine when opened via Dev C++; it's only when I try to open it independently that it doesn't work.
See
http://www.cplusplus.com/forum/beginner/1988/#msg7262

You need to read all 120 replies to really get the benefit of it.
Ohhhh! Thanks a ton! :))
Topic archived. No new replies allowed.