Re: [Dev-C++] Dev-C++] won't let me see the results
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Philip B. <phi...@pb...> - 2007-11-05 08:11:31
|
iostream adds a lot to the size of the executable due to license issues.
stdio however, does not. If you are writing a C++ application you'll want to
include cstdio rather than stdio.h, I found that you get a smaller
executable that way. I dislike iostream to begin with anyway, I only use it
when I absolutely have to. stdio is the way to go if you ask me, but that's
a matter of personal preference.
Regards
Philip Bennefall
----- Original Message -----
From: "Chris Miller" <lor...@gm...>
To: "Per Westermark" <pw...@ia...>
Cc: <dev...@li...>
Sent: Monday, November 05, 2007 4:10 AM
Subject: Re: [Dev-C++] Dev-C++] won't let me see the results
> Per Westermark wrote:
>> Dev-C++ is behaving the standard Windows way, i.e. console applications
>> started from a graphical program closes as soon as the application ends.
>>
>> Just add a system("pause") command at the end of main(), or add a command
>> to read from stdin.
>>
> As a matter of practise, it's better to include either iostream or stdio
> and to either cin; or to scanf();, since that's more cross-platform.
> system("pause") only works on Windows platforms, which is a really bad
> thing IMHO. I often write code that needs to work on UNIX and Win32
> platforms, so it's best to learn to write the right way, as opposed to
> having to run through and change a bunch of code later.
>
> If someone knows a more elegant way still, I'm totally open to that.
> Including either of those console libraries adds a significant size to
> the resultant binary, so if there's something else I'm not aware of, I'd
> love to hear it :)
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> 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
>
|