Running a program

This is a discussion on Running a program within the C++ Programming forums, part of the General Programming Boards category; When I run a text program in ms dos..how do i keep the window from closing out when its finished...I ...

  1. #1
    Registered User quiksilver9531's Avatar
    Join Date
    Nov 2001
    Posts
    36

    Running a program

    When I run a text program in ms dos..how do i keep the window from closing out when its finished...I know i can do go to the file manually thru msdos and it wont close but I want to know if theres something you can put in the code so it doesn't close when you when it from the file..Thanks

  2. #2
    Unregistered
    Guest

    Try this

    U can use system("PAUSE") but u have to include stdlib.h. It displays press any key to continue and waits for u to press a key to quit.

  3. #3
    Registered User quiksilver9531's Avatar
    Join Date
    Nov 2001
    Posts
    36
    Thanks can you post like an example code please Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program running long
    By smarta_982002 in forum Windows Programming
    Replies: 3
    Last Post: 03-27-2008, 06:24 AM
  2. Running my program in the background
    By shoobsie in forum Windows Programming
    Replies: 4
    Last Post: 10-09-2005, 03:38 AM
  3. Replies: 3
    Last Post: 09-05-2005, 09:57 AM
  4. Why is my program running away?
    By badkitty in forum C++ Programming
    Replies: 4
    Last Post: 09-19-2001, 05:27 PM
  5. Running program
    By muffin in forum C Programming
    Replies: 5
    Last Post: 08-30-2001, 11:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21