Doh, spot the C++ programmer!
Why is there a Priority and a sorted priority in that output? Your struct only has one priority variable.
What do you mean by "qsort returns 0's"? qsort doesn't return anything and it doesn't assign zero to anything. All it does is move your data around to put it into the correct order.