Hello all, long time since i've posted anything here. Working on a small project and nearing the end; however i am having some trouble regarding pointers to 'multidimensional' arrays, hopefully somebody can help me out. :)
I have what i think is an array of 2D arrays of which I am trying to assign a array of pointers to each 2D array.
char (matrix[2][2])[22]; //an array of 22 2x2 arrays
char (*pntr[22])[2][2]; //an array of 22 pointers to a 2x2 array of chars
pntr[0] = matrix[0];
To my current understanding this should assign the first pointer to the first array of 2d arrays; however i am still getting the compiler error "Warning: assignment from incompatable pointer type" & program crashes when i try and acess data pointed to by 'pntr'. Any help & an explanation as to what i am doing wrong would be greatly appreciated, thanks in advance.