Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sort using comparator anonymous function c++

sort(mMyClassVector.begin(), mMyClassVector.end(), 
    [](const MyClass & a, const MyClass & b) -> bool
{ 
    return a.mProperty > b.mProperty; 
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #comparator #anonymous #function
ADD COMMENT
Topic
Name
5+7 =