I want to pass two 2D arrays into a function in order to copy the whole array. I am using double pointers to do this but it is showing error.
void copy_arr(float **new_table,float **table,int m,int n)
{
//code
return;
}
It is showing error for the 2D array 'new_table' only.
The function calling :
void optimize(float **table,int m,int n)
{
int pivot[2];
find_pivot(table,m,n,pivot);
float new_table[m][n];
//code
copy_arr(new_table,table,m,n);
return;
}
error: cannot convert 'float (*)[(((sizetype)(((ssizetype)n) + -1)) + 1)]' to 'float**' for argument '1' to 'void copy_arr(float**, float**, int, int)'