c++11中的for简化用法时间:2023-03-09 22:23:56 1、序列for循环 map<string,int> m{{"a",1},{"b",2},{"c",3}} for(auto p:m) { cout<<p.first<<":"<<p.second<<endl }