I\'m writing a simple file for one of my classes that is a simple linked list activity and I need to sort a linked list.
This is my source code so far:
/
Rather than copy someone else's code that has known issues, I'd suggest making your own. You'll learn a lot more and just might end up with fewer bugs.
That said, if you want to know what it's not working, follow through what happens once the smallest value reaches the head of the list. tmpPtr->value
will get set to 1, which gets assigned to a
, which ends up skipping the inner while
loop.