In BCB, I need to pass a two dimensional array to a function Ratio. I did this without pointers or reference. Could any body else tell me what I should revise if I want to use pointers or reference for input?
double Ratio(double a[3], double VA[3][3], int i)
{
double bg;
if (a[i] <= 0.0) bg = VA[0][i];
else if (a[i] > VA[2][i]) bg = VARAT[1][i];
else bg = (1.-a[i]/VA[2][i])*(VA[0][i]-VA[1][i])+VA[2][i];
return bg;
}
In the main:
int main()
{
...
Ratio(a1, VA1, n);
...
}