> double Sma(double *ds, int size)
> {
>     double res = 0;
>     for (int i = 0; i < size; i++)
>        res += ds[i];
> 
>     return ds / (double)size;
> }

My compiler complained about the ds in the return statement. It wanted this I 
guess 'cause I changed it and it accepted.

return *ds/(double) size;

It also didn't like the for statement saying int i. I changed it to this.

int i,res=0;
for(i=0;i<size;i++)

I don't know what kind of errors these are but I think they have something to 
do with C89 and ISO C.

Bill


Reply via email to