-
API Input?
I want to start studing input that I can acutally use; but I don't know much or anything about it. I herd that API input is what I should look into but I don't know what that is exactly. if someone could point me in a direction of any kind that would be great
~Matty-Alan~
-
You're asking for something extremely vague. Instead of having people guess what it is that you really want to do, I would suggest you be a little more specific with stating your intentions. ;)
-
Basicly what i'm looking for is someway to collect input continuesly without programs pausing at a getchar(); or equivilent event. something that i can start making games with that continue to play out even if there is nothing being entered.
-
Like this?
Code:
int c = 0;
while(c != 27) { /* or 0x1b: ESCAPE */
if(kbhit()) {
c = getch();
printf("You entered '%c'\n", c);
}
printf("Processing . . .\n");
}
(For Dev-C++, try including <conio.h> and using getche() instead.)
Also see http://faq.cprogramming.com/cgi-bin/...&id=1043284392
Note that whatever non-buffered keyboard input you use will be non-standard.