I am trying to get the standard deviations in my array and the funtions pow() and sqrt() won't work because "error more than one instance of overloaded function pow". Same error with the sqrt.
I've researched it and it has something to do with using integers in the statement. If I caste them as doubles then they work but the results aren't accurate.
If anybody knows how to work around this problems, it would be extremely helpful.
Here is the code I have written so far:
void standard (int array, int numItems, int average)
int i = 0, j, n;
int sum = 0, variance;
int hold ;
for (i = 0; i < numItems; i++)
hold[i] = array[i];
i = 0;
n = numItems;
for (j = 0; j < numItems; j++)
hold[i] = pow((hold[i] - average),2);
sum += hold[i];
variance = sum / (n - 1);
printf ("\nThe standard deviation is %i\n", sqrt(variance));