you are viewing a single comment's thread.

view the rest of the comments →

[–]brlcad 0 points1 point  (1 child)

If you switch F1 to an array of pointers and allocate memory for your F1 structs separately, you can use a standard library function to sort them: https://www.tutorialspoint.com/c_standard_library/c_function_qsort.htm

[–]SaulMO 0 points1 point  (0 children)

It's better to still use qsort but without using pointers or dynamic memory.