C++ map 遍历

迭代器遍历:

// it->first map的key
// it->second map的value
map<string, string>mp;
for (auto it = mp.begin(); it != mp.end(); ++it)
{
     
	cout << it->first << it->second << endl;
}

你可能感兴趣的:(数据结构)