【发布时间】:2017-10-13 16:06:34
【问题描述】:
这是填充地图的现有代码。
typedef unordered_map<std::string, SomeSet> StringToSetMap;
StringToSetMap myMap;
std::string str ("hello");
SomeSet &mySet = myMap[str]; //Map populates here
“SomeSet”是一个类型定义的 unordered_set。
据我所知,地图只能以here 提到的方式填充
这是如何以这种方式填充地图的?
【问题讨论】:
-
您链接到的问题的答案如何使这里发生的事情不清楚?
标签: c++ c++11 unordered-map