i just starting using this ide, and i noticed that when i run programs the dialog box appears for a split second and then disappears. Is there a way to keep it there to ensure my program is producing the correct output?
Printable View
i just starting using this ide, and i noticed that when i run programs the dialog box appears for a split second and then disappears. Is there a way to keep it there to ensure my program is producing the correct output?
This question just came up in another thread for Visual Studio .NET 2003 (http://www.sharkyforums.com/showthread.php?t=274022). Maybe the replies there apply to DevC++? I haven't used anything but Visual Studio for several years now.
man still no response :(
Quote:
Originally Posted by CPUmelter
Umm....there's a response right above your message....
You need to pause the code or run it from within a persistent command prompt window to see what's happening. If it just runs successfully it'll close the window immediately afterwards.
it was the "pause" command that someone mentioned, just in case anyone runs into the same problem.
i believe its
system("pause)";
Btw, I think youd find yourself much happier working with something like the Visual Studio C++ express (which is free right now due to it being in beta) than Dev C++, Dev C++ is a steaming pile of crap IMHO.
system("pause"); works, but it's not a great way to do it since you're calling a pause.exe that happens to come with most C++ environments...
a better way to halt execution after your code has finihsed is with a little loop like:
int c;
do{
cout<<"Press Enter To End..."<<endl;
c = getchar();
if(c == EOF) break;
} while(c != '\n');