I\'d like to reorder the items in a vector, using another vector to specify the order:
char A[] = { \'a\', \'b\', \'c\' }; size_t ORDER[] = { 1, 0, 2 }
If it is ok to modify the ORDER array then an implementation that sorts the ORDER vector and at each sorting operation also swaps the corresponding values vector elements could do the trick, I think.