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: seb_kramm <seb...@ya...> - 2007-11-05 08:42:09
|
Chris Miller a écrit :
> 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();, [...]
> If someone knows a more elegant way still, I'm totally open to that.
Sure: ;-)
#ifdef __WIN32__
system("pause");
#endif
Do the same for the header file include (can't remember wich one it is at present),
so it can't mess up other stuff in case of a non-win32 build.
|