I have an array of structures that I would like to sort.
typedef struct
{
int param;
int priority;
} mystruct;
I have an array of them.
mystruct myarray[10];
How can I quick sort them. I have been googling around and found couple of examples, but wanted to see if you guys have a shorter method.
I want to sort the array by the structures priority.
Thanks.
typedef struct
{
int param;
int priority;
} mystruct;
I have an array of them.
mystruct myarray[10];
How can I quick sort them. I have been googling around and found couple of examples, but wanted to see if you guys have a shorter method.
I want to sort the array by the structures priority.
Thanks.
Comment