Advertisement
Uncleeee

Untitled

Nov 14th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. setlocale(LC_ALL,"rus");
  10. vector<char> v = {'A', 'q', 'E', '5'};
  11. sort(v.begin(), v.end(), [](char a, char b) {return a<b;});
  12. for (auto x: v){
  13. cout<<x<<" ";
  14. }
  15. return 0;
  16. }
  17. // a<b - 5 A E q
  18. // a>b - q E A 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement