Используйте это:
int a[sizex][sizey]; //this creates an array with empty slots
a[x][y]=somenumber; //this changes a value of slot on (x,y) coordinates
sizex
: размер x в массиве
sizey
: размер y в массиве
Пример:
e
= пусто
int a[4][5]; /*creates an array: e, e ,e ,e
e, e ,e ,e
e, e ,e ,e
e, e ,e ,e
e, e ,e ,e*/
a[1][2]=5; /*Now array look like this: e, e ,e ,e
5, e ,e ,e
e, e ,e ,e
e, e ,e ,e
e, e ,e ,e*/
cout<<a[1][2]; //this prints number 5