Answers for "sort tuple c++"

C++
0

sort tuple c++

vector<tuple<int,int,int>> v;
v.push_back({2,1,4});
v.push_back({1,5,3});
v.push_back({2,1,3});
sort(v.begin(), v.end());
//the order of the tuples is (1,5,3), (2,1,3) and (2,1,4).
Posted by: Guest on April-12-2021

Browse Popular Code Answers by Language