could some one look at the program and tell me what i am doing wrong all i want to do is to make a character x and move i around
#include <iostream.h>
#include <stdlib.h>
char map[8][8];
char possition[x][y];
int x=1;
int y=1;
char command;
main()
{
cout<<map[1][1]<<map[1][2]<<map[1][3]<<map[1][4]<<map[1][5]<<map[1][6]<<map[1][7]<<map[1][8];
cout<<map[2][1]<<map[2][2]<<map[2][3]<<map[2][4]<<map[2][5]<<map[2][6]<<map[2][7]<<map[2][8];
cout<<map[3][1]<<map[3][2]<<map[3][3]<<map[3][4]<<map[3][5]<<map[3][6]<<map[3][7]<<map[3][8];
cout<<map[4][1]<<map[4][2]<<map[4][3]<<map[4][4]<<map[4][5]<<map[4][6]<<map[4][7]<<map[4][8];
cout<<map[5][1]<<map[5][2]<<map[5][3]<<map[5][4]<<map[5][5]<<map[5][6]<<map[5][7]<<map[5][8];
cout<<map[6][1]<<map[6][2]<<map[6][3]<<map[6][4]<<map[6][5]<<map[6][6]<<map[6][7]<<map[6][8];
cout<<map[7][1]<<map[7][2]<<map[7][3]<<map[7][4]<<map[7][5]<<map[7][6]<<map[7][7]<<map[7][8];
cout<<map[8][1]<<map[8][2]<<map[8][3]<<map[8][4]<<map[8][5]<<map[8][6]<<map[8][7]<<map[8][8];
cout<<"enter a direction\n.";
cin>>command;
while (command!='exit')
{
switch (command)
{
case 'e':
(map[x][y] = map[x][y++]);
break;
case 'd':
(map[x][y] = map[x][y--]);
break;
case 'f':
(map[x][y] = map[x++][y]);
break;
case 's':
(map[x][y] = map[x--][y], cout<<map[x][y]<<"X");
break;
default:
cout<<"bad input"
break;
}
}
else
system("pause");
return 0;
}