ArrowKeys - case'P cout<<"Down"<<endl...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream.h> #include <conio.h> # main() { char ch; ch = getche(); while (ch != 13) { switch(ch) { case 'a': break; case 'i': break; case 0: //arrow key. .. ch = getch(); switch (ch) { case 'H' : cout<<"UP"<<endl; break;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: case 'P': cout<<"Down"<<endl; break; case 'M': cout<<"Right"<<endl; break; case 'K': cout<<"Left"<<endl; break; default: cout<<int(ch); } } ch = getche(); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online