what header do i need to use the keyhit, RIGHT, LEFT, UP, and DOWN keywords
what header do i need to use the keyhit, RIGHT, LEFT, UP, and DOWN keywords
Never heard of keyhit. I have heard of kbhit() found in the conio.h.
ok could i use it like this
if(kbhit==RIGHT)...
or would it be
if(kbhit(RIGHT))...
and what do i need to use the identifiers RIGHT LEFT DOWN UP...
some one please take the time to help
Last edited by c++.prog.newbie; 12-23-2001 at 09:00 PM.
Cut the following code to see if you have got what you need. It is a small sample of how kbhit works.
#include <iostream.h>
#include <conio.h>
void main( void )
{
int i;
//75 72 77 80
while( 1 )
{
while( !kbhit() )
{
}
i = getch();
cout << "\nLast key hit has number code: " << i << endl;
}
}
zMan