I have a vector with 3 columns.
{0,1,10}
{0,2,15}
{0,3,33}
{0,4,12}
How can I get the next result ?
{0,3,33}
{0,2,15}
{0,4,12}
{0,1,10}
As I think I should use the following code:
std::sort(a.begin(), a.end(),
[](const std::vector< int >& a, const std::vector< int >& b)
{ return a[1] > b[1]; });
So I need to sort according to the third number in each vector but first two should also go up because i need a list with sorted vector.