Hi there, I have a structure of the fllowing:
and I have a pointer to this nodes struct that has around 50 items (connected with the nextphrase pointer).
I was wondering if there was a quick way to sort this nodes in alphabetical order (sorting the char *text field).
Code:
typedef struct nodes
{
char *text;
int index;
struct nodes *nextphrase
} nodes;
and I have a pointer to this nodes struct that has around 50 items (connected with the nextphrase pointer).
I was wondering if there was a quick way to sort this nodes in alphabetical order (sorting the char *text field).