Possible Duplicate:
C++ console keyboard events
I want a Windows console program to do something if a certain key is pressed down, something like
while(1)
{
    ....
    if(the key 'o' is pressed down)
      ....
}
but I don't know what to put in the if statement. How do I check if the key 'o' is pressed down?
I'm using Windows 7 64-bit and Visual Studio Professional 2008.
 
     
     
    