I need to know how to use qsort to sort structures on the basis of just one field in the structure.
for eg.
struct abc {
double* field;
int* class;
}
Each field has a corresponding class i.e class associated to field[i] is class[i]. I need to sort the double* field in ascending order and at the same time assign the original class values to each field.