Hi all,
I try to write code that stores 2D array in a row, but I want to access to it by [][] operator. The code is
May be there is an mistake causing errors in my numerical computation. Valgrind says there are no errors. Pleas hlep.Code:double** arr;
int x=19,y=17;
arr=(double**)malloc((x+1)*sizeof(double*))+1;
arr[-1]=(double*)calloc(y*x,sizeof(double));
for(int i=0;i!=x;i++)
arr[i]=&arr[-1][i*y];
P.S.: I hope you can understand my english