I'm 90% certain the problem is with how I'm using qsort().
I verified that the compare function works by using bubble sort. I must be overlooking something but not sure what.
Well here is the code, maybe one of you can point me to the right spot (or wrong spot depending on how you look at it )
Note: Code attached due to length.