How do I pass the m matrix to foo()? if I am not allowed to change the code or the prototype of foo()?
void foo(float **pm) { int i,j; for (i = 0; i
void foo(float **pm) is the same as void foo(float *pm[]) which is not a two-dimensional array of floats. It is an array of float*. Now, those float* may themselves point to float arrays, but that's a separate matter.
void foo(float **pm)
void foo(float *pm[])
float*