Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID


We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ms dos question

PaladinBluePaladinBlue Posts: 6Member
Hello, i am a new programmer, am working with C++, and i have a problem, i am working with a windows ME setup, with DEV compiler, but when i run the programs, the ms-dos embedded window only stays open for a fraction of a second.
any-one had this problem in the past, or know how to help?
the two programs i just wrote tonight, Hello World, the classic, and a listing program, were written exactly as the book tells me to write them, but my ms-dos window is jacked up?
thanks all.

Sweet are the whisps of wind in which we all seek, but bitter are the torrets of life that overcome us.
PaladinBlue is in like the wind, dances of the tounges of unbelievers and is out like smoke.


  • NitroAtomNitroAtom Posts: 12Member
    Chances are when you build an .exe the 'close on exit' option is set by default, which means that as soon as the program displays "Hello World" on the screen and exits, the DOS window closes. This can be resolved by either right-clicking the .exe, selecting the 'Program' tab, and deselecting the 'close on exit' option. Or just add a getch(); at the end or your programs.
  • ammar84ammar84 Posts: 21Member
    As a remark only the getch() is in the .
Sign In or Register to comment.