fork(18) download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. int main() {
  8. int z = 0;
  9. std::vector<std::string> names = {"john", "bobby", "dear", "test1", "catherine", "nomi", "shinta", "martin", "abe", "may", "zeno", "zack", "angeal", "gabby"};
  10.  
  11. sort(names.begin(), names.end() );
  12.  
  13. for(auto name : names){
  14. cout << name << endl;
  15. }
  16. return 0;
  17.  
  18. }
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
abe
angeal
bobby
catherine
dear
gabby
john
martin
may
nomi
shinta
test1
zack
zeno