?
Solved

simple (any key to continue)

Posted on 1998-05-08
4
Medium Priority
?
225 Views
Last Modified: 2010-04-10
I have a program with instruction and i want to tell the user to hit any key to continue (including enter or spacebar), when they are done reading the instructions.  How can i do this (plus i do not want to display the character which the user typed).

Thanks
0
Comment
Question by:onestar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
spap earned 60 total points
ID: 1175029
which os are you using?
try the command getch();
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175030
I believe getch() is not part of the standard c++ library.  It is only available for Microsoft Visual C++ programs.  (If that's what you are using, then its fine, but if not...)
0
 
LVL 1

Expert Comment

by:spap
ID: 1175031
Dear nietod i feel getch() is a part of c++ library.

here is a part of bc3.1  help related to getch().

 __________________
 _getch and getche_                 <CONIO.H>
 __________________
  _ getch gets a character from console but does not echo to the screen
  _ getche gets a character from console, and echoes to the screen

 Declaration:
  _ int getch(void);
  _ int getche(void);

 Remarks:
getch reads a single character directly from the keyboard, without echoing
to the screen.
-------------------------------------------------------------------------
Any way i feel that knowing the OS and the development tool of our friend ( onestar ) is a must to answer his question precicely.

best regards.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175032
Agreed that we need to know the OS etc.  But in the VC documentation it is not marked as being part of the ANSII C or C++ library.  They say it is part of the windows C library.  However, I don't trust the documentation completely, so it might be standard C++.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question