Standard C++ Library Class Reference
.
sort(vec1.begin(), vec1.end(),greater_equal<int>());
After this call to sort, vec1 will be sorted in descending order.
Warnings
If your compiler does not support default template parameters, then you need to always supply the
Allocator template argument. For instance, you'll have to write :
vector<int, allocator>
instead of
vector<int>
See Also
Function Objects