ms dos question

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.

Pb
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.

Comments

  • 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.
  • Hi,
    As a remark only the getch() is in the .
Sign In or Register to comment.

Howdy, Stranger!

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

Categories