我有一个嵌套在另一个地图中的地图,我想为外部地图分配值,但我不太确定该怎么做。这会导致程序在开始之前就中断。我运行它时没有显示任何错误
map<int, map<int, int>> outer;
map<int, int> inner;
outer.emplace(1, make_pair(2, 1));
outer.emplace(2, make_pair(2, 1));
outer.emplace(3, make_pair(2, 1));
outer.emplace(1, make_pair(3, 1));
任何帮助都会有所帮助,谢谢