Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process returned 0 <0x0> execution time : 2.249 s
- Press any key to continue.
- c1 = getch();
- if(c1 == 0)
- {
- c2 = getch();
- if(c2 == 72) {cout << endl << "Up Arrow" << endl;}
- else if(c2 == 80) {cout << endl << "Down Arrow" << endl;}
- else{cout << endl << "Incorrect Input" << endl;}
- }
- switch(getch()) {
- case 65:
- cout << endl << "Up" << endl;//key up
- break;
- case 66:
- cout << endl << "Down" << endl; // key down
- break;
- case 67:
- cout << endl << "Right" << endl; // key right
- break;
- case 68:
- cout << endl << "Left" << endl; // key left
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement