I have a 2-dimensional integer array of constant size which I declare as
int array[SIZE_1][SIZE_2];
I would like to declare a pointer p so that I can assign a “row” of the 2-dimensional array to it, i.e.
p = array[index];
I have tried declaring p as
int (* p)[SIZE_2];
but this gives me a "assignment from incompatible pointer type" warning (GCC on MinGW).
So how do I declare p correctly?
Your are pointing to an array of integers(Row):-
This also works:-