OK, I think I've lost all my C++ knowledge here. i can't properly pass a 2D array of floats to a function.
I have a dynamically allocated 2d array of float and I have a function that should fill it. The size is known before the call for the function.
I have this:
the function deffinition
Code:
void GetData(FILE *ptr, FILE *out, unsigned int Mask[], float &mtxVicVals, int n , int s)
{
........
if(Mask[j] == 1)
{
mtxVicVals[i][p] = Values[j];
p++;
}
.............
}
the function call
Code:
GetData(inp, out, Mask, mtxVicVals, vars.NumParam, vars.NumScan);
I know I'm thinking of it as a 1D array. Will I use two & in th declaration?