Suppose I want to sort vector A,B and C based on vector A in the ascending order, such that vector B and C will change accordingly. If vector A contains two or more same elements, then priority will be given to larger value on corresponding vector C. Take an example.
A=25,10,10,5,5
B=12,14,3,45,6
C=123,23,12,45,76
After sorting it would look like this
A=5,5,10,10,15
B=6,45,14,3,12
C=76,45,23,12,123
Can anyone tell how to write a c++ program for that ?which library can be use for this?