Results 1 to 5 of 5

Thread: "press enter to continue"

  1. #1

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197

    "press enter to continue"

    in a console app, how can that be done
    retired member. Thanks for everything

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    cout<<"Press any key to continue..."<<endl;
    getch();

    I think getch is in conio.h

  3. #3
    Lively Member slx47's Avatar
    Join Date
    Apr 2002
    Location
    US
    Posts
    127

    try this ...

    #include <iostream.h> //used for cout/cin
    #include <stdlib.h> //needed for system pause

    int main()
    {
    cout<<"Welcome to my program"<<endl;
    system("pause");

    return 0;
    }

  4. #4
    Addicted Member
    Join Date
    Aug 2001
    Location
    I'm mobile
    Posts
    166
    me thinks the 'system("pause")' is used in bloodshed c++, i remember trying it in VC and it didnt work
    strange, because I've used it in VC++ and it worked perfectly.
    [p r a e t o r i a n]

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Re: try this ...

    Originally posted by slx47
    #include <iostream.h> //used for cout/cin
    #include <stdlib.h> //needed for system pause

    int main()
    {
    cout<<"Welcome to my program"<<endl;
    system("pause");

    return 0;
    }
    It should be <iostream> and <cstdlib>, followed by the correct using statements
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width