getchar()

Stan Brown browns at iccgcc.decnet.ab.com
Sun Mar 10 03:26:21 AEST 1991


In article <1991Mar6.165835.10237 at cs.mcgill.ca>, storm at cs.mcgill.ca (Marc WANDSCHNEIDER) writes:
> In article <1991Mar5.220902.19196 at ux1.cso.uiuc.edu> gordon at osiris.cso.uiuc.edu (John Gordon) writes:
>>
>>	Your problem is that getchar() does not recognize ANY input until
>>you hit Enter.
> 
>     Then is there ANY way that I can have sort of "HOT KEYS" ie the user
> just hits a  key, and then the computer recognizes that a key has been hit
> and the key is sent to some variable...?  (Using MSDOS...)

As several people have said, there's no portable way to do this.

You don't say which compiler you're using.  In Microsoft C, use _bios_keybrd
or getch.  I would imagine there's something similar in Turbo C.  

Is it appropriate to remind you to RTFM?  

My opinions are mine:  I don't speak for any other person or company.
                   email (until 91/4/30): browns at iccgcc.decnet.ab.com
Stan Brown, Oak Road Systems, Cleveland, Ohio, USA    +1 216 371 0043



More information about the Comp.lang.c mailing list