I have read a lot of stackoverflow-posts and some google-results, but havent found something perfect.
Basically I have a two dimensional array with points(integer) in the first row and an integer to identify which "run" the points belong to. I want to sort the array based on the points, but not lose the identifier when sorting.
What is the shortes way to write that sortcode?
Before:
string points[][] =
{
{ 12, 13, 10, 0, 0, 0 },
{ 1, 2, 3, 4, 5, 6 },
}
After:
string points[][] =
{
{ 13, 12, 10, 0, 0, 0 },
{ 2, 1, 3, 4, 5, 6 },
}
Not the best example, but i hope you see the point.