Re: [Dev-C++] why does window close after execution? newbie
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Graham <sai...@bi...> - 2003-08-01 14:09:05
|
woops .. obviously a newbie ...
I replied under the wrong subject
here it is with right subject header
I did look at the FAQ
this is where I found the Pause suggestion
my question was
can I prevent the window closing with a setting in DEV-C
When I was learning other languages and using JGrasp for instance it could
be set to not close the window so that the output could be viewed. This
was not done by code added on the end each time but was done by a setting in
JGrasp ... I was hoping it was possible to change a setting in DEV-C to
achieve this.
I could not find an answer in the FAQ and wondered if anyone here could
assist.
Please forgive me if this is not the correct forum for such a question.
regards
Graham
----- Original Message -----
From: "OROSZI Balázs" <or...@vp...>
To: <dev...@li...>
Sent: Friday, August 01, 2003 9:01 PM
Subject: Re: [Dev-C++] why does window close after execution? newbie
Graham wrote:
> I have installed Dev-C under Win XP Pro
> and am running the traditional "Hello World" as the first exercise in my
> tutorial.
> When it is compiled and run it instantly closes the window after
> printing to the screen. I therefore cant see the output.
> Is there a way to change this with a setting of DEV-C or will I have to
> put up with adding some sort of pause statement at the end of everything
> I write?
>
> my code looks like this
> /*
> *Hello, "Hello World.\n"
> */
> #include <iostream>
> int main ()
> {
> cout<<"Hello, world.\n";
> return 0;
> }
This is indeed a VVVVVFAQ (very-very-very-very-...).
BTW this is absolutely NORMAL behaviour. To make the dos-prompt stay,
you need to pause your program at the end. Use this line before return:
getc();
This will wait for an "Enter".
(I don't like system("PAUSE"), as that is platform-dependent).
--
Greetings,
Balázs
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
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
|