how to "wait for any key"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Malkis

    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.
  • Alf P. Steinbach

    #2
    Re: how to "wait for any key"

    * Alexander Malkis <alexloeschedie smalk@line.cs.u ni-sb.de> schriebt:[color=blue]
    > 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.[/color]

    There's no portable way.

    See the FAQ:
    <url: http://www.parashift.c om/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?

    Comment

    • Julián Albo

      #3
      Re: how to &quot;wait for any key&quot;

      Alexander Malkis escribió:
      [color=blue]
      > What is the most portable way of "waiting for any key", i.e. the user[/color]

      There is no portable way.

      Regards.

      Comment

      Working...