954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

sorting descending order in vector

can anyone tell me particular code that work opposite way for "sort", where....

sort(b, e)

Rearranges the elements defined by the range [b, e) into nondecreasing order. Defined in .

from Accelerated C++

Vastor
Junior Poster in Training
68 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

sorry for double post, I mean the sort work for non INcreasing order

Vastor
Junior Poster in Training
68 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 


key word : std::greater
if std::greater can't meet your need, you could try
key words : functor, lambda expression, std::function, std::bind

stereomatching
Posting Whiz in Training
260 posts since Sep 2010
Reputation Points: 28
Solved Threads: 10
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You