I just came across some problem here, I had to create some 2D array to help holding values for some other array (1D), so they have both the same number of lines.
Problem is, as values in the first array get sorted, all lines from the new one should follow accordingly but I don't know how to do this with my current sorting function. The code looks a bit like this:
Edit: Just to precise something, arr1 is the array that sorts all others and arr9 to 11 are supposed to be the lines from the 2D array, somehow, but I don't know how to put that.