View Single Post
Old 08-26-2008, 09:19 PM   #2 (permalink)
george_1988
 
Newb Techie

Join Date: Aug 2008

Posts: 16

george_1988 is on a distinguished road

Default Re: C++ Programming Help

As far as I know there is no functions for determining keypresses, however I believe there many be a way around this for detecting ANY key press. Sorry I don't know how to determine a given key press such as A or B.

Although this is not C++ code you should be able to implement it.

Code:
char key;

puts("press any key...");
getch(key);

if(getch != '\0')
{
     code for "not equal to null" (in other words, if a key is pressed)
}
else
{
     code for "is equal to null" (in other words, if a key is NOT presssed)
}
I hope this helps you in some way. If not, then I am clueless.

Last edited by george_1988; 08-26-2008 at 09:21 PM.
george_1988 is offline