Arrow keys are special case and don't work with normal char assignments. I tried doing the same a while back didn't think it worth the trouble of figuring out so did like dunnmifflsys said. Basically as simple as this:
// get movement from user and map it on game board
cout << "Select a direction (w, a, s, d) or r to idle, q to quit.";
cin >> move;
if(move == 119) // (w) up
{
// move up
}
elseif(move == 97) // (a) left
{
// move left
}
elseif(move == 115) // (s) down
{
// move down
}
elseif(move == 100) // (d) right
{
// move right
}
elseif(move == 114) // (r) stay in place
{
// don't move but attack and/or get attacked
}
elseif(move == 113) // (q) quit
{
return 0;
}
It would probably be easier to read if I had used the characters instead of the numbers and it could have been a case instead of if/else ifs, but that's basically all there is to it.