News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

codeblocks injecting garbage code?

Started by jinjin12, September 17, 2011, 08:25:04 PM

Previous topic - Next topic

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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