Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: bingobeawr on August 03, 2008, 04:06:44 am
-
I noticed that CodeBlocks have built in code for not closing a window when the program is executed. While in Other compilers you use such code as
std::cout << "Press the enter key to exit";
std::cin.ignore(std::cin.rdbuf()->in_avail()+1);
Where can I find the script to edit this in Code Blocks.
-
I think it's not in any script.
In the windows version there is an executable named "cb_console_runner.exe" in codeblocks installation directory that handles execution of the programs.
If you type "C:\CodeBlocks\cb_console_runner.exe calc.exe" it runs calc.exe and when you close the application it prints the message you mention and pauses the console until you press a key. Replace "C:\CodeBlocks" with your installation directory and calc.exe with your executable
Maybe you could make your own "cb_console_runner.exe" and replace it, or search in the source of codeblocks.
-
If you don't want that behaviour, turn it off in the project options. No need to change code.