Solved

simple (any key to continue)

Posted on 1998-05-08
4
213 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
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
spap earned 20 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now