i have 2 string vectors and one holds key values and other holds corresponding values.
i have sorted the key vector by using sort function lexicographically.
but i have to sort the values vector also …
how can i do it? please help me .
Sorting 2 vectors according to one
You can make a vector of pairs…and store the key value pairs as pairs in the vectors…then use a comparator to sort your vector as required