Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ sort code

vector <int> vect; //any container
vector <int>::iterator start = vect.begin(), end=vect.end(); //iterator for the begin and end of the container
sort (start,end); //std::sort (increasing order)
sort (start,end,greater<int>()); //std::sort (decreasing order)
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #sort #code
ADD COMMENT
Topic
Name
1+5 =