how can i tell if a key is being pressed ?
This is for a console application in msvc6.0
I dont want to use cin or scanf because this pauses the program and waits for the user to press a key. I just want it to continuously run through the loop and if a key is pressed then I want to know what it is.
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
bumping it up one time because this problem is pissing me off
I know there is a function that does this because I have seen it in a piece of code somewhere before but I can tremember where so I cant find it
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
I know there is a function that does this because I have seen it in a piece of code somewhere before but I can tremember where so I cant find it
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
a console app, wouldn''t that be
if(kbhit())
{
if(getch()==27)
return 0;
}
or something like that?
JoeMont001@aol.com www.polarisoft.n3.net
if(kbhit())
{
if(getch()==27)
return 0;
}
or something like that?
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement