HELP!! can someone please help me, because i need to create a game in which i have to count how many times i've pressed enter in a matter of 1 minute.

What operating system and what compiler ? The easiest way to capture the Enter key would be to use the non-standard functions in conio.h, but your compiler may or may not support that.

we use Visual basic 2005 for the c++, my group and i have no idea on how we will be able to do this. can you help me?

What operating system and what compiler ? The easiest way to capture the Enter key would be to use the non-standard functions in conio.h, but your compiler may or may not support that.

we use Visual 2005 for the c++, my group and i have no idea on how we will be able to do this. can you help me?:)

I'm not going to write the program for you, but to get the Enter keys

while(_kbhit() )
{
   int c = getche();
   if( c == '\n' )
   {
      printf("got one\n");
   }
}

I'm not going to write the program for you, but to get the Enter keys

while(_kbhit() )
{
   int c = getche();
   if( c == '\n' )
   {
      printf("got one\n");
   }
}

thanks a lot! this would do! Thanks again :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.