@Duoas - I'm in your debt, this worked beautifully. However, if you have a moment, could you give a brief explanation as to what is going on here? I'm assuming you are doing some sort of dereferencing? I want to make sure I understand in case I have to use something like this again.
What is happening is casting the 'void pointer' to a 'const int pointer' and then dereferencing it.
Void pointer can point to anything. So your parameter can be any type of pointer. However in your case since you are explicitly casting it to an int* you need to make sure you pass it a valid datatype.
The qsort() function(s) don't care what your data type is. But your comparison functions do... however, C has no generics outside of requiring your comparision function to take void pointers as arguments. But your comparison function is specific to type anyway, so inside the function you can just cast the arguments to the correct type.