PeterOut <Ma**********@excite.comwrites:
Say I have a function like this.
int Func(float **fppArg);
and I have a variable defined thus.
float faa2DArray[3][3];
How would I pass faa2DArray to Func()?
You can't, at least not directly. You can write:
float *tmp[] = { faa2DArray[0], faa2DArray[1], faa2DArray[2] };
Func(tmp);
or even:
Func((float *[]){faa2DArray[0], faa2DArray[1], faa2DArray[2]});
if you don't mind straying into C99. This is more universal:
float *tmp[3];
tmp[0] = faa2DArray[0];
tmp[1] = faa2DArray[1];
tmp[2] = faa2DArray[2];
Func(tmp);
However, the fact that you need these gymnastics suggests that
something has gone wrong. Can't you start with the right shape of
array in the first place, or change Func to take the array you have?
--
Ben.