Is it possible to convert a single dimensional array into a two dimensional array?
i first tought that will be very easy, just set the pointer of the 2D array to the
You can't initialise an int bla[2][3] with an int* (what foo becomes in that context).
int bla[2][3]
int*
foo
You can achieve that effect by declaring a pointer to arrays of int,
int
int (*bla)[3] = (int (*)[3])&foo[0];
but be sure that the dimensions actually match, or havoc will ensue.