I have the code below and I keep getting an error saying that swap isnt a function. Just wondering if anyone had any idea why. Thanks
void swap(double *x, double *y ){
double temp;
temp = *x;
*x = *y;
*y = temp;
void sort(double h[], int size){
int i, j;
for (i=(size-1); i>=0; i--){
for(j=1; j<=i; j++){
if (h[j-1] > h[j]){
swap(*(h+(j-1)),*(h+j);
}
}
}
}