I hate I'm asking for help again. Unfortunately it seems there just aren't any links I can find on making an array that holds a bunch of two dimensional arrays. Maybe my google-fu is lacking. Basically I have a header file like this:
#define MATRIX 10
int white_l1[MATRIX][MATRIX];
int white_l2[MATRIX][MATRIX];
int white_l3[MATRIX][MATRIX];
int white_m1[MATRIX][MATRIX];
int white_m2[MATRIX][MATRIX];
int white_m3[MATRIX][MATRIX];
int white_r1[MATRIX][MATRIX];
int white_r2[MATRIX][MATRIX];
int white_r3[MATRIX][MATRIX];
int *side_one[] = { white_l1, white_l2, white_l3, white_m1, white_m2, white_m3, white_r1, white_r2, white_r3};
When I try to compile with it I get lots of the following:
mine.h:165:21: warning: initialization of �int *' from incompatible pointer type �int (*)[10]' [-Wincompatible-pointer-types]
int *side_one[] = { white_l1, white_l2, white_l3, white_m1, white_m2, white_m3, white_r1, white_r2, white_r3}; /*
^~~~~~~~
mine.h:165:21: note: (near initialization for �side_one[0]')
mine.h:165:31: warning: initialization of �int *' from incompatible pointer type �int (*)[10]' [-Wincompatible-pointer-types]
int *side_one[] = { white_l1, white_l2, white_l3, white_m1, white_m2, white_m3, white_r1, white_r2, white_r3}; /*
^~~~~~~~
mine.h:165:31: note: (near initialization for �side_one[1]')
mine.h:165:41: warning: initialization of �int *' from incompatible pointer type �int (*)[10]' [-Wincompatible-pointer-types]
int *side_one[] = { white_l1, white_l2, white_l3, white_m1, white_m2, white_m3, white_r1, white_r2, white_r3}; /*
... etc, etc
I've tried making these lines pointers:
int *white_r3[MATRIX][MATRIX];
Then I just get similar output at compile time:
mine.h:165:91: note: (near initialization for �side_one[7]')
mine.h:165:101: warning: initialization of �int *' from incompatible pointer type �int * (*)[10]' [-Wincompatible-pointer-types]
e_one[] = { white_l1, white_l2, white_l3, white_m1, white_m2, white_m3, white_r1, white_r2, white_r3};
To be honest, I'm a little shaky on what �int * (*)[10]' even means. I would guess that a pointer to a pointer where one has been cast, but I'm probably wrong. At least I would think so from the code I used.
Any suggestions or insight much appreciated.