This is my first post ever for trying to get help with code, so please go easy on me. I want to be honest, this is FOR homework, but is NOT homework. I have created this example to work from in order to understand qsort further because the next assignment requires it's use.
Our teacher gave us this small piece of example code and I am trying to expand on it to serve my purpose.
[C] Sorting - Pastebin.com
The code gives me no errors, but does not sort the array. I'm very confused, and if somebody could clarify the use of qsort in this instance that would be amazing.
I am imagining that the reason it's not sorting properly ( or at all ) is because of my comparison function. That is really just an assumption. Or perhaps I just don't understand the pointer array i'm using. Either way, I would really appreciate some advice.