c++11中的for简化用法

1、序列for循环

map<string,int> m{{"a",1},{"b",2},{"c",3}}

for(auto p:m)

{

cout<<p.first<<":"<<p.second<<endl

}

原文地址:https://www.cnblogs.com/xietianjiao/p/6143972.html