how to "wait for any key"

  • Thread starter Alexander Malkis
  • Start date
A

Alexander Malkis

What is the most portable way of "waiting for any key", i.e. the user
who runs a program from the console should observe the following:

- the program stops running
- as soon as the user presses any keyboard key (alphanum/Enter), the
program continues.

Thanks a lot,
Alex.
 
A

Alf P. Steinbach

* Alexander Malkis said:
What is the most portable way of "waiting for any key", i.e. the user
who runs a program from the console should observe the following:

- the program stops running
- as soon as the user presses any keyboard key (alphanum/Enter), the
program continues.

There's no portable way.

See the FAQ:
<url: http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.17>.

It's always a good idea to check the FAQ before posting.
 
?

=?iso-8859-1?Q?Juli=E1n?= Albo

Alexander Malkis escribió:
What is the most portable way of "waiting for any key", i.e. the user

There is no portable way.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,362
Latest member
ChandaWagn

Latest Threads

Top