DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Wait until the <Enter> key is pressed

  1. #1
    Adam Guest

    Wait until the <Enter> key is pressed


    Hi

    This is my code.

    cout << "\n\t\t\t Salt and Vinegar Chip Counter";
    cout << "\n\t ----------------------------------";
    cout << "\n\t Please press <Enter> to continue.";


    I have been trying to make the program wait for the <Enter> key to be pressed
    but cannot find anything in the help menu or my books that will allow this.

    Can any help.

    Thanks in advance
    Adam



  2. #2
    Danny Kalev Guest

    Re: Wait until the <Enter> key is pressed

    add:

    char ent;
    cin >> ent;

    after the last cout statement.

    Danny

    Adam wrote:
    >
    > Hi
    >
    > This is my code.
    >
    > cout << "\n\t\t\t Salt and Vinegar Chip Counter";
    > cout << "\n\t ----------------------------------";
    > cout << "\n\t Please press <Enter> to continue.";
    >
    > I have been trying to make the program wait for the <Enter> key to be pressed
    > but cannot find anything in the help menu or my books that will allow this.
    >
    > Can any help.
    >
    > Thanks in advance
    > Adam


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center