|
From: Michal M. <mi...@mo...> - 2008-03-03 21:43:58
|
frederico schardong napsal(a):
> look this:
>
> main(){
>
> int a;
>
> while (1){
> if (a=kbhit())
> printf("key press: %d",(char)a);
> }
> }
>
>
> I need that: the program show me which keys are pressed in speed it reads..
> I was tried some alternatives and no work.. one is at the top of the page..
> What's happening is.. any key I press, printf go to the work and not
> pause... if I don't press not, nothing works..
>
> sugestions?
the function you need to use is getch(), not kbhit()
|