I have an an integer array of values and I would like to make a double pointer to point to this array. I assume that this 1D integer array actually represents a 2D array. That is for instance that if I have an int A[2000*12]
then I have 12 lines and 2000 rows. The problem is that I do not know how to initialize the pointer to point to the array A. My initial thought was like that:
int A[2000*12];
int **ptr;
ptr=&A[0];
Of course this is not correct. More precisely I get the following error: incompatible pointer types in assignment