Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <functional>
- template <class T>
- struct lessPtr
- {
- bool operator()(const T&a, const T&b) const
- {
- return std::less<T>()(*a, *b);
- }
- };
- std::sort(pv.begin(), pv.end(), lessPtr());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement