Keyboard Strokes w/o Delay...

Hello(again), but I was wondering how you would obtain a keyboard stroke from a user with no delay(they don't have to hit enter) and then place that stroke into a variable?

Lets say you tell the user to hit, on the numpad, a number. Then that number is placed into a variable w/o the user hitting enter to confirm. I tried fooling around with getch(), but I don't know how to then have that number placed into a variable. Any info will be greatly appreciated, thanks!

Mike

I'm not sure if this is what you're asking but...

main()
{
int c;

....
....
....
c = getch();
printf("%c", (char)c);
....
....
}

Obviously, you would want to do this in a loop but
use caution as this, (assuming NO_DELAY) in a tight loop will
consume lost of CPU doing nothing. Again, I'm not exactly
clear on your objective.

This is exactly what I needed to know, thank you once again rwb!

Mike