Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

simple (any key to continue)

Posted on 1998-05-08
4
Medium Priority
?
229 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

  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 …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

610 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