I've been looking for the c keyboard input and can't find it.

  • Thread starter Thread starter academic
  • Start date Start date
A

academic

Hate to ask such a simple question but I've been looking through Help and
can't find what I need.

If I need to abort the app I print a message (fprintf) and return -1

Between those two I'd like to pause the app until user presses a key.

I've been looking for the c keyboard input and can't find it.

Just need to know user pressed any key.



Thanks
 
Hate to ask such a simple question but I've been looking through Help and
can't find what I need.

If I need to abort the app I print a message (fprintf) and return -1

Between those two I'd like to pause the app until user presses a key.

I've been looking for the c keyboard input and can't find it.

Just need to know user pressed any key.

there are a number of options. check MSDN for:

- getchar
- getc
- scanf

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
I'll look them up.

Hope one doesn't require an Enter before it returns anything.


thanks
 
Hope one doesn't require an Enter before it returns anything.
In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam".
 
I never would have found that.

thanks
Bruno van Dooren said:
In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam".
 
works great
thanks again

Bruno van Dooren said:
In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam".
 
Back
Top