#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { vector<char> v; for(int i=0; i < 26; i++) v.push_back('A'+i); // Use not2() to reverse sort v. sort(v.begin(), v.end(), not2(less<char>())); return 0; }