迭代器遍历: // 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; }