I have the following code in the caller function
int matrix[3][3] = {{1, 2, 3},{4, 5, 6},{7, 8, 9}};
find_index(matrix);
and the find_index's prototype is:
void find_index(int** m);
and I got compiler error: cannot convert 'int (* )[3]' to ‘int**’
Anyway I can fix this? Thanks!
update:
is there a way that I can then use m[a][b] operator in the second function instead of passing the column number and do m[a * col_num + b]?
matrixis an array of pointers? Of course they are not compatible types...int[]to a function expecting anint*, but not anint[][]to a function expecting anint**.