Yet Another Question

Now that I have getch() to work, I have yet another problem. BTW, thank you for answering these questions, I do ask a lot, only because I am eager to know, what is a board used for anyways :slight_smile:

Ok, he's the problem...

#include iostream.h
#include conio.h

int main()
{

char movement;

movement = getch\(\);

cout << movement;

if\(movement == 8\)
\{		
cout << "This is what happends when you press 8";
\}

return 0;

}

So, it should print "This is what happends when you press 8", but it doesn't. I have no idea what it could be, because it looks as right as rain. Anyways, thanks for the help!

Mike

I'm a c programmer, not a c++ programmer, but I gotta say I think that if statement needs some help. You're checking to see if movement is a decimal 8 and that's not what the 8 key transmits. In c
if(movement == '8')
would be correct. Give that a try.

AH-HA! Thank you Perderabo!!! It works perfectly now

Mike