Hi,
Can someone tell me how to fix the function below. I am getting this compile error regarding the last line:
cannot convert `const double' to `const double*' in return
What should I return according to the function parameters I've written?
Thanks.
const double * maximum(const double a[], int size)
{
if (size == 0) return NULL;
const double *highest = a;
for (int i = 0; i < size; i++)
if (a[i] > *highest)
{
*highest == a[i];
}
return *highest;