In comp() for qsort(C language) I can not use
Code: Select all
int comp(double *p,double *q)
{
return *q-*p;
}
Code: Select all
int comp(double *p,double *q)
{
if(*q-*p>0) return 1;
else if(*q-*p<0) return -1;
else return 0;
}