Hi Steph, I've attached some source code with two versions in... both use the HeapSort & IntCompare functions that you mentioned, but due to the organisation of your array (1000x5 as opposed to 5x1000) the HeapSort function doesn't quite work right... So the 1st version uses a temporary array to hold the data from one of the 1000 element data sets to be processed by the sort routine. The second version changes the 2D array to a 5x1000 one, and then can simply pass the pointer to the 2nd dimension as the argument to the HeapSort function.
As it stands the HeapSort sorts the array in ascending order. If you want descending order, simply switch the arguments in the IntCompare function call
Hope this helps
JB