![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
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 like to play Quake |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Re: Yet Another Question
Quote:
if(movement == '8') would be correct. Give that a try. |
|
#3
|
|||
|
|||
|
Thanks!
AH-HA! Thank you Perderabo!!! It works perfectly now
Mike
__________________
I like to play Quake |
|||
| Google The UNIX and Linux Forums |