User forums > Help
codeblocks injecting garbage code?
(1/1)
jinjin12:
hey guys im new to codeblocks and i have a question. in devc++ or wxdev++ , in order for your to view the output terminal, you have to type in garbage code at the end of the main such as cin.get() or a system("pause"), otherwise the output window will come up and close immediately. however, in codeblocks, i see that i don't have to do this as codeblocks leaves the output window open. i do that see that text in the output window looks very much like what you would see if you did a system("pause"), so is codeblocks, unbeknown to me, injecting garbage code like a system("pause") or other garbage code into my source file just to keep the window open? i really want to know.
stahta01:
No, it is NOT doing that.
Try running your command/exe from the command line.
Tim S.
Jenna:
If the "Project -> Properties -> Build targets -> [target] -> Type" is "Console application" and "Pause when application ends" is schecked, C::B runs the app through a wrapper (cb_console_runner) and the wrapper keeps the command window open.
jinjin12:
ok cool, good to not that it's not injecting any garbage code, thanks. btw i'm using new-> empty file
Navigation
[0] Message Index
Go to full version