fork download
  1. #include <list>
  2. #include <map>
  3. #include <set>
  4. #include <string>
  5. #include <iostream>
  6.  
  7. int main()
  8. {
  9. std::list<std::map<std::set<std::string>, int>> l =
  10. {
  11. {
  12. {{"a"}, 0},
  13. {{"b"}, 1},
  14. {{"c"}, 2},
  15. },{
  16. {{"a", "b"}, 3},
  17. {{"a", "c"}, 4},
  18. {{"b", "c"}, 5}
  19. },{
  20. {{"a", "b", "c"}, 6},
  21. }
  22. };
  23.  
  24. for(auto list_it = l.begin(); list_it != l.end(); ++list_it)
  25. for(auto map_it = list_it->begin(); map_it != list_it->end(); ++map_it)
  26. std::cout << map_it->second << ' ';
  27. std::cout << '\n';
  28. }
  29.  
Success #stdin #stdout 0s 3480KB
stdin
Standard input is empty
stdout
0 1 2 3 4 5 6