Hi I am trying to qsort a struct, here is my code for my struct:
I have trying to work this out for days, but cant get my head around it.Code:struct pers { char *name; int age; }; typedef struct queue { int number; struct pers person[400]; }cc; cc p[21];
At this point the "struct pers person[400];" contains data which is linked to the struct pers, i need to use a qsort to sort [asc] based on the persons age.
Please any suggestions? You help would be greatly appreciated.
Thanks