trouble with pointers

I have to change this call by reference into a call by address, how would i do that?

void calcstat (double average [], int size, double &a, double &b, double &c, double &d)

{
double sum;
a=average[0];
b=average[size-1];

for(int i=0; i < size; i++)
sum+= average[i];
c = sum/size;

for(int i=0; i < size; i++)
{
d+= pow(average[i]-a,2);
}
d=sqrt(d/(size-1));


}


use * instead of & in the parameter, and wherever the variable is used, dereference it by putting a * in front of the variable.
Topic archived. No new replies allowed.