我试图将unordered_maps存储在一个更大的unordered_map中,但我很难访问这些内部映射。我在下面发布了一个我想要做的事情的例子。
unordered_map<int, unordered_map<int, string>> outermap;
outermap[0][0] = "whatever";任何帮助,为什么这不起作用,将不胜感激,谢谢!
发布于 2014-05-03 17:43:24
以下内容与“2013年维也纳公约”进行了比较好的汇编:
#include <unordered_map>
int main ()
{
using namespace std;
unordered_map<int, unordered_map<int, string>> outermap;
outermap[0][0] = "whatever";
}所以,你的问题的可能原因:
<unordered_map>。using namespace std。当然,无论如何,您都应该考虑在名字前面加上std::!https://stackoverflow.com/questions/23447781
复制相似问题