Me personally I would call a sorting algorithm from the STL Algortihms.
Before anyone on here writes all of the code for you, you will most likely have to write some yourself. (Not trying to be mean, but this makes it sound like you do not know where to begin.)
For starters at least code a linked list and post it here. And then possibly attempt writing a sort function. You may ask for any help with issues you encounter along the way.
After I see some attempt to begin this work on your own, I will help you anyway I can.