Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to sort a 2d array in c++

bool sortcol(const vector<int>& v1, const vector<int>& v2)
{
    return v1[1] < v2[1];
}
sort(vect.begin(), vect.end(), sortcol);
 
PREVIOUS NEXT
Tagged: #sort #array
ADD COMMENT
Topic
Name
5+6 =