typedef std::vector<TIndicatorOrder *> vector_indicatorOrder_t;
std::sort(list.begin(), list.end());
void print_elem(int* i){ std::cout << *i << "\n";}template<class T>bool ptr_less(const T* lhs, const T* rhs){ return *lhs < *rhs;}int _tmain(int argc, _TCHAR* argv[]){ std::vector<int*> v_int; for (int i=0; i < 10; ++i) v_int.push_back(new int(10-i)); std::cout << "Before sort:\n"; std::for_each(v_int.begin(),v_int.end(),&print_elem); std::sort(v_int.begin(),v_int.end()); std::cout << "After simple sort:\n"; std::for_each(v_int.begin(),v_int.end(),&print_elem); std::sort(v_int.begin(),v_int.end(),&ptr_less<int>); std::cout << "After sort:\n"; std::for_each(v_int.begin(),v_int.end(),&print_elem); return 0;}