fork(3) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <map>
  4. #include <string>
  5. #include <algorithm>
  6.  
  7. int main() {
  8. std::map <std::string, uint64_t> mymap_tcp_l7;
  9. std::vector <std::pair <std::string, uint64_t>> vec(mymap_tcp_l7.begin(), mymap_tcp_l7.end() );
  10. std::sort(vec.begin(), vec.end());
  11. for (auto p : vec){
  12. std::cout << p.first << ' ' << p.second << std::endl;
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3300KB
stdin
Standard input is empty
stdout
Standard output is empty