Re: [Dev-C++] problem of running the code
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Maya <Esc...@ne...> - 2003-12-01 14:32:24
|
Replace 'system("pause");' with 'std::cin.get();', and see what happens!
Have a good one, but if your are going to have more than one, give me a
call ;)
s2...@st... wrote:
>On Mon, 1 Dec 2003, Theodore Kypraios wrote:
>
>
>
>>When I am running it (ctrl + F10) , the dos-window disappears. (I
>>have -system("pause") before return 0;) .
>>
>>
>>
>
>Can it be that system() fails? It simply finds a shell (cmd.exe) and
>executes in it the command you wrote: in WinXP "pause" is defined, but
>something can ever go wrong. Try an input, std::cin << a char if you're
>using C++, instead of using system, that's less portable (maybe that not
>all shells support that command).
>
>You say in debug it works: how? Simply starting debug with no breakpoints
>it stops for you to press a key? If so try redirecting output to a file to
>see what normal execution printed out, this can give you more hints.
>
>Hope I helped, bye.
>
>Ferdinando
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
--
Jorge Escalante
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|