hi everyone.. is there a way to reset the kbhit function?
like if when a character enters then the kbhit will return 1, how can i do this so that its value will go back to 0?
void func1(void)
{
if (kbhit())
{
do something...
}
}
void func2(void)
{
do something...
}
void main (void)
{
while(1)
{
func1();
func2();
}
}
how can i reset the value of kbhit so that after a character has entered and it has already entered the func1 function, it wont enter this function not until a new character has arrived.. please help.. thanks
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Mon Apr 07, 2008 9:39 pm
Call the getc() function to get the character.
xindy Guest
thanks
Posted: Mon Apr 07, 2008 9:56 pm
thanks pcm programmer.. thanks for sharing your expertise for newbies like me..
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum