User forums > General (but related to Code::Blocks)
Problem with executing compiled program. Please help.
cshong:
The following problem does not occured in Microsoft Visual C++ IDE.
I'm using Code::Blocks 8.02.
I use 'int main()' to declare the main function. I had input 'return 0' at the end of the main() function.
When I try to execute my compiled program with Code::Blocks, my program show "Process returned 0 (0x0) execution time....". I don't want this statement to be displayed.
Can I solve this problem without modifying my source code?
Ceniza:
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).
cshong:
--- Quote from: Ceniza on June 07, 2008, 08:24:56 am ---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).
--- End quote ---
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?
MortenMacFly:
--- Quote from: cshong on June 07, 2008, 03:21:09 pm ---Am I able to do this without modifying my source code?
--- End quote ---
Why don't you just launch your application from the command line / prompt?!
cshong:
--- Quote from: MortenMacFly on June 07, 2008, 04:23:14 pm ---
--- Quote from: cshong on June 07, 2008, 03:21:09 pm ---Am I able to do this without modifying my source code?
--- End quote ---
Why don't you just launch your application from the command line / prompt?!
--- End quote ---
Thanks for your suggestion. I appreciate it.
Navigation
[0] Message Index
[#] Next page
Go to full version