See Program Results

This is a discussion on See Program Results within the C++ Programming forums, part of the General Programming Boards category; What do you need to do in order to be able to see the program results. The programs run and ...

  1. #1
    Unregistered
    Guest

    See Program Results

    What do you need to do in order to be able to see the program results. The programs run and disappear in a flash. I was told to leave "cin.get()" just before the end of the program, but that still doesn't work. Urgent Help!!!!

  2. #2
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    ARRRRRRRGGGHHH search the board. This has been replied to millions of times.

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    317
    You're probably doing something weird .

    Just declare a variable: char b;
    then just place: cin>>b; at the end of the program and see if that works for ya.

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    18
    I always just add the following to the end of my program...
    Code:
    // The following halts the program waiting for the
    // user to press the '"Enter Key" to quit.
        cout << "\n\n";
        cout << "Press Enter key to quit: ";
        cin.ignore(80, '\n');
        cin.get();

  5. #5
    Unregistered
    Guest
    I usually use good ol' getch. Make sure to include <conio.h> though.

    [code]
    //other code
    getch();
    return 0;
    }
    [code]

    This will exit the main loop as soon as any key is pressed.

  6. #6
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200

    uh..

    i always use

    getchar();

    or

    system("pause");
    What is C++?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 06:49 PM
  2. Replies: 3
    Last Post: 07-11-2005, 03:07 AM
  3. Same seed for srand yields different results
    By codegirl in forum C++ Programming
    Replies: 3
    Last Post: 06-23-2003, 02:39 PM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. redirection program help needed??
    By Unregistered in forum Linux Programming
    Replies: 0
    Last Post: 04-17-2002, 05:50 AM

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