I have the following array:
I want to pass the array to the following function:Code:double **A; A = new double*[s]; for (int i=0;i<s;i++) A[i]=new double[3];
but I get the message from the g++ compiler:Code:function1 (double A[][3],int n) { ... }
cannot convert `double**' to `double (*)[3]' for argument
`1' to `double function1(double (*)[3], int)'
How should I declare and initialize the dynamic array
to make it work with the function? I cannot change
function1, because it is written by someone else.