Results 1 to 4 of 4

Thread: MS-DOS apps

  1. #1
    Senior Member
    Join Date
    May 2004
    Posts
    206

    MS-DOS apps

    Whenever I compile a MS-DOS app, I have to add system("pause"); to the end. Otherwise, it just flashes and exits. When I run a pre-compiled app though, I can't add this. Is there anything I can do to stop it from happening?
    It is better to die on your feet than to live on your knees.

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    You are referring to NT console mode applications, not DOS apps. They aren't the same.

    The reason that the window disappears, is that once the process that created it dies, the window goes away.

    If you are interested in seeing the output from such a program, just start it from a shell rather than explorer.

    Slarty

  3. #3
    Go to the start menu click "run"... type cmd in the run box and enter it, then navigate to your program with the "dir" and "cd *folder*" commands, or "cd .." to go up a level in your folder structure. When you are in the folder, just type the name of the program, if it is an .exe. When you navigate to it this way, it won't close the window when the program dies.

  4. #4
    Senior Member
    Join Date
    May 2004
    Posts
    206
    Thanks, it works fine now. :-)
    It is better to die on your feet than to live on your knees.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •