Re: [Dev-C++] problem of running the code
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ferdinando F. <s2...@st...> - 2003-12-01 12:07:42
|
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
|