Pretty much as the title. I'm writing a linked list and I need a function to sort the list alphabetically, and I'm pretty stumped. Not sure how this has never come up before, but I have no idea how to do it other than to create my own function listing the entire alphabet and comparing positions of letters from scratch.

Is there any easy way to do this?

Edit for clarity:

I've got a linear linked list of class objects, each class object has a char name, and I'm writing a function to compare the name of each object in the list, to find the highest object alphabetically, and then find the next object down alphabetically, etc, linking them together as I go. I already have a function that does this for an int field, so I just need to rewrite it to compare inequalities between alphabetical characters where a is largest and z is smallest.

In hindsight that was probably a lot more relevant than I thought.

I think a couple of the answers I've gotten already should work so I'll pop back and select a best answer once I've gotten it working.

I'm also working with g++ and unity.