I have a question about sorting the values inside vectors;
I have three vectors V1,V2,and V3, in order to sort the elements ineach vector I know that I can use sort(v.begin(); v.end()) and the question is :
Is there any method that can let me sort the value of V1 but at the same time the corresponding values (i.e.with the same index) in V2 and V3 will be arranged depending on the new position of the elements in V1.
to illustrate my question here is an exemple:
1 2 3
V1[5,2,8,4,3], v2[C1,C2,C3,C4,C5], V3[0.2,0.4,0.25,0.15,0.6]
I want to get:
V1[2,3,4,5,8], v2[C2,C5,C4,C1,C3], V3[0.4,0.6,0.15,0.2,0.25]