Your executable doesn't show that. It's a program Code::Blocks uses to run your program through that displays that message. You can remove that behavior by clicking on Project -> Properties... -> [Build targets]. Select your target and _uncheck_ Pause when execution ends. AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).
Thanks for your reply. But your solution will disable "Press any key to continue". I want the program to
ONLY DISPLAY "Press any key to.."
but NOT DISPLAY "Process returned 0 (0x0) execution...." at the end of execution.
I'm scared that my lecturer will deduct my marks if he see "Process returned 0 (0x0) execution...." in the screenshot of my program, and I must run it inside the IDE.
Am I able to do this without modifying my source code?