void sPtr(int *numbers, int size, int *pMinimum, int *pMaximum, double *pAverage)
{
double sum = 0;
pMinimum = pMaximum = numbers;
for (int i = 0; i < size; i++)
{
if (numbers < pMinimum)
pMinimum = numbers;
elseif (numbers > pMaximum)
pMaximum = numbers;
sum += *numbers;
}
pAverage = (sum / size);
}
Hello guys!
So I am messing around with some pointers but I cant seem to find a solution for one of my functions. basically the last line where I have to assign the pointer to the average it throws an error. I am wondering how can I solve this problem so I can pass the average back as a pointer. Thank you for any help.