#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    1
    Rep Power
    0

    Why is the output on xp not staying up...


    when i compile and run, the output stays on my screen for less than a sec,

    i tried a pause command or get command but the damn window wont stay up, i have xp-pro...

    anyone know how i keep the output to dos up so i can see the output lol
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,172
    Rep Power
    2222
    We would need to know more about what you're trying to do.

    I assume that you have written a console app in something like Visual C++, then told Visual C++ to run it.

    What I do is open a DOS window (actually, that's the first thing I do after I log on). cd to the directory where the .exe file will be (in Visual C++, this will be the Debug directory under the project directory). Then I build the app in Visual C++, but I run it in the DOS window.

    Of course, debugging can be a bit of a pain doing it that way.
  4. #3
  5. not a fan of fascism (n00b)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Feb 2003
    Location
    ct
    Posts
    2,756
    Rep Power
    95
    i noticed that in visual studio.net, if u do a real simple program like a hello world, and then select start w/ debugging it will just flash the output for a second orless. dont know if that's what ur using??
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    26
    Rep Power
    0
    You app finished its job and “Pressed any key” automatically…
    You may prevent it by using ‘system pause’ at the end of your app.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    56
    Rep Power
    13
    here is the code from Dev C++'s template

    Code:
    #include <iostream.h>
    #include <stdlib.h>
    
    int main()
    {
    
          system("PAUSE");
          return 0;
    }
    system("PAUSE"); ;)
    PHP is fun
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    London
    Posts
    349
    Rep Power
    13
    Or by putting a breakpoint on the last line of main

IMN logo majestic logo threadwatch logo seochat tools logo