auto it = 10LL;
string str = "zhangsan";
std::map<string, string> map;
map.insert(make_pair(str, str));
for (auto iter = begin(map); iter != end(map); ++iter) //通常写法 auto iter = map.begin() ; .......
{
cout << iter->first.c_str() << endl;
}
return 0;
来源:CSDN
作者:芒种、
链接:https://blog.csdn.net/weixin_38739598/article/details/103603695