Author Topic: a lil help  (Read 3783 times)

jeff.

  • Guest
a lil help
« on: October 03, 2009, 10:56:20 pm »
im using code::blocks for my c++ coding and i ran into a probelm . first of all im using all the default setting on it. anyways all my programs build and run just fine inside code::blocks but when i go to my folder to just run them as the exe they either just close immediatley as soon as i click them to run them or they will run and my program will ask to do what i told it to do like enter your number here and press enter . but when i press enter it just closes. this happens with all my programs even ones as simple as a hello world project. i cant figure out what the problem is . this seems to be just with c++ because when i do the equivialnt in C it runs fine as the exe. any help would be appreciated. thanks

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: a lil help
« Reply #1 on: October 03, 2009, 11:06:57 pm »
Hi !

Did you try to run it from a command prompt?

Dje

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: a lil help
« Reply #2 on: October 04, 2009, 02:59:02 am »
Did you add an getchar() at the end of the program to cause it to pause as needed in beginner command line programs.

Note: if not a beginner you can ignore above info.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org