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 <algorithm>.
from Accelerated C++
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 <algorithm>.
from Accelerated C++
sorry for double post, I mean the sort work for non INcreasing order
key word : std::greater
if std::greater can't meet your need, you could try
key words : functor, lambda expression, std::function, std::bind
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.