hi everybody,
i am using code blocks with the mingw compiler to develop my c++ console applications,
in the end of each program, i get the message "Process returned 0 (0x0). execution time : ....... press any key to continue"
How can i get rid of that.
Thanks

Dani AI

Generated

That message is coming from Code::Blocks itself (the console-runner wrapper) — it prints the program exit code and execution time and then pauses the console so you can read the output. and pointed out quick workarounds (hiding the output pane or running the .exe outside the IDE). Both are fine for a one-off, but there are cleaner, persistent options.

To stop the summary and pause permanently, open Code::Blocks settings and look for the environment/console options (Settings -> Environment or Preferences -> Environment on some builds). Search for the option named something like "Pause when execution ends" (or simply search for "pause") and disable it. That prevents the IDE from pausing and printing the “Process returned … Execution time … Press any key…” line.

If you want to keep the pause but avoid the wrapper text, use a real terminal: configure an external terminal in the same Environment settings (the "Terminal to launch console programs" box) or run the compiled .exe from a command prompt. If toggling the environment options does not remove the message, check Plugins -> Manage plugins and look for the Console/ConsoleRunner plugin; disabling that plugin (and restarting the IDE) will stop the wrapper output.

Caution: disabling the pause makes the console close immediately when you run the program by double-clicking the .exe, so run from a command prompt if you still need to inspect output.

Recommended Answers

All 2 Replies

hit the 'x' just under the scroll bar for the source code viewing area. You can also find this 'x' by looking at the message you got and moving to the top-right of its box. I do not suggest getting rid of this necessarily as it is relatively important information.

in the end of each program, i get the message "Process returned 0 (0x0). execution time : ....... press any key to continue"
How can i get rid of that.

Stop running the program from within Code::Blocks. :icon_rolleyes:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.