Thread: Forcing a program to stay open.

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    6

    Forcing a program to stay open.

    I've tried using cin.get() to stop the program from closing itmediatley and it will work, if I'm only displaying text. But when I use a program where the user can input (cin >>) it will close after the user inputs the data. From these forums I found sysem("pause") which solved everything... but I don't like the message it gives (Press any key to continue...).
    Thanks in advance,

    anyomous

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    cin.ignore(80, '\n');
    cin.get();

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    6
    thanks it worked

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. program not staing open
    By Unlockitall in forum C++ Programming
    Replies: 6
    Last Post: 07-11-2007, 08:39 AM
  2. Open a new program from a C++ application
    By axr0284 in forum C++ Programming
    Replies: 9
    Last Post: 12-29-2004, 11:29 AM
  3. drawing over the open program.
    By Unregistered in forum Windows Programming
    Replies: 6
    Last Post: 01-23-2002, 02:37 PM
  4. get program to open a html file
    By task in forum C Programming
    Replies: 14
    Last Post: 11-09-2001, 11:20 AM