system("Pause"); for visual C++ 6 when using command line??

This is a discussion on system("Pause"); for visual C++ 6 when using command line?? within the C++ Programming forums, part of the General Programming Boards category; Hello everbody. I've done a search in the forum but didn't come across anything that would answer my question. I ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    12

    system("Pause"); for visual C++ 6 when using command line??

    Hello everbody.

    I've done a search in the forum but didn't come across anything that would answer my question.

    I have the Dev C++ compiler and I also have Visual C++ 6.0.

    In the Dev C++ you use:

    system("Pause");

    so the program doesn't flash and go away when you click on it.

    Is there something that I could put into my programs when I use VC++ 6 so when I run the program it doesn't just flash and go away.

    Thank you,

    array

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    From the FAQ

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    don't use system("pause")... just use std::cin.get() (and if you're using it after a std::cin>> use cin.ignore())
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    12

    Thanks

    Thank you both for replying. Now my program pauses when I click
    on it. I'm new to C++ but I have somewhat of a C background.
    Again, thanks for your help!

    array

Popular pages Recent additions subscribe to a feed

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