Sorting (Mutil-dimensional arrays)
Posted: Thu Oct 20, 2005 5:33 am
In the STL, is there a default function that sorts a rectangular 2D array based on a specified column? For instance, if I have:
Array-Index studentID grades
0 5 90
1 6 8
How do I get a list of the students based on grades ranking (i.e. Sort the grades column)? This should be a fairly common task. It would be clumsy to manually program a new sorting algorithm just for something so simple.
Array-Index studentID grades
0 5 90
1 6 8
How do I get a list of the students based on grades ranking (i.e. Sort the grades column)? This should be a fairly common task. It would be clumsy to manually program a new sorting algorithm just for something so simple.