here is a possible solution
Code:
#include <iostream.h>
#include <conio.h>
int main(void)
{
char c;
cout<<"Type 'right', 'left', 'up', or 'down' to move";
// Use whatever method you need to get the keys
// getch is just a function that gets the arrow keys so i use it here
c = getch();
if(c == 'M') // Right Arrow Key
cout<<"You moved right";
if(c == 'K') // Left Arrow Key
cout<<"You moved left";
if(c == 'H') // Up Arrow Key
cout<<"You moved up";
if(c == 'P') // Down Arrow Key
cout<<"You moved down";
return 0;
}
please note that getch functions differently on different compilers so you may need to find an alternate input method. but it should work as needed here in MSVC.