| View previous topic :: View next topic |
| Author |
Message |
Alexander Malkis Guest
|
Posted: Sun Mar 07, 2004 3:11 pm Post subject: how to "wait for any key" |
|
|
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.
|
|
| Back to top |
|
 |
Alf P. Steinbach Guest
|
Posted: Sun Mar 07, 2004 3:35 pm Post subject: Re: how to "wait for any key" |
|
|
* Alexander Malkis <alexloeschediesmalk (AT) line (DOT) cs.uni-sb.de> schriebt:
| Quote: | 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.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
|
|
| Back to top |
|
 |
Julián Albo Guest
|
Posted: Sun Mar 07, 2004 3:36 pm Post subject: Re: how to "wait for any key" |
|
|
Alexander Malkis escribió:
| Quote: | What is the most portable way of "waiting for any key", i.e. the user
|
There is no portable way.
Regards.
|
|
| Back to top |
|
 |
Alexander Malkis Guest
|
Posted: Sun Mar 07, 2004 5:46 pm Post subject: Re: how to "wait for any key" |
|
|
Alf P. Steinbach wrote:
| Quote: | * Alexander Malkis <alexloeschediesmalk (AT) line (DOT) cs.uni-sb.de> schriebt:
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.
Thank you. The link there doesn't work, but google knows the missed file |
kbhit.c
--
Best regards,
Alex.
PS. My real email is formed by deleteing the letter combination
"loeschedies" from the email address given.
|
|
| Back to top |
|
 |
Rolf Magnus Guest
|
Posted: Mon Mar 08, 2004 12:10 am Post subject: Re: how to "wait for any key" |
|
|
Alexander Malkis wrote:
Works fine here.
| Quote: | but google knows the missed
file kbhit.c
|
That's not portable at all.
|
|
| Back to top |
|
 |
|