when i put ("Pause"); on a c++ win32 console application it still closes ? help!!!!?
Kane
2011-08-20 17:46:01 UTC
when i put ("Pause"); on a c++ win32 console application it still closes ? help! me i cant make my app now
i also tried system("Pause"); but it says systemis undefined can someone help please!!
thanks!
Four answers:
modulo_function
2011-08-20 17:52:50 UTC
The
system(..)
function is in
So, you need to add
#include
The proper form is
system("pause");
Silent
2011-08-20 17:52:31 UTC
Well, ("Pause"); is not a valid C++ statement, so I'd be surprised if it even compiles.
The system() function is in stdlib, so you need to add:
#include
to your source code if you want to use that function. If you don't understand what functions and header files are, or why ("Pause"); doesn't make sense, then you need to go back and learn that before you get any further.
anonymous
2016-10-20 02:07:54 UTC
uncertain I comprehend your question, yet right here is what i think of you're saying. you're working your app by way of debug, (or whether you double click) and the window on your software opens and closes. this occurs when you consider which you haven't any longer any breakpoints set (for debug) and no pauses. It merely runs your software and exits. in case you want to be waiting to look at your run (and that i continuously do), open a command on the spot window. Navigate to the Debug folder that has your executable. enter the call and run this gadget that way. whilst this gadget exits, the window continues to be open and you will look at your output. additionally, in case you have an enter document or a great variety of output which you quite want to look at, you may pipe the two or the two an enter and output filename to the executable.
Nick M
2011-08-20 17:49:26 UTC
Depending on the compiler, you may need to #include or #include
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.