language: C++ 4.7.2 (gcc-4.7.2)
date: 172 days 21 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <vector>
#include <functional>
#include <algorithm>
 
struct ptr_comparer {
    template<class Object>
    bool operator()(const Object* first, const Object* second) const {
        return std::less<Object>()(*first, *second);
    }
};
 
int main() {
    std::vector<int*> data_str;
    std::sort(data_str.begin(), data_str.end(), ptr_comparer());
}