If i have a QVector<double> lets say vect1 with values of 30, 5, 3, 20 and I want to sort from low to high I can use qsort, but if I have a second QVector vect2 that is related to the first, and also has the same number of elements is there anyway for me to also sort the second vector vect2 based on how the first vector vect1 was sorted.
e.g. vect1 = [30, 5, 3, 20], vect2 = [0, 1, 2, 3] before sorting. After sorting vect1 = [3, 5, 20, 30] and ideally we would have vect2 as vect2 = [2, 1, 3, 0]
cheers
Oz
Bookmarks