我正在尝试使用unordered_map和另一个unordered_map作为键(自定义散列函数)。我还添加了一个自定义的相等函数,尽管它可能不需要。unsigned long hashing_func(const unordered_map<char,int>& m) { for (auto& e : m)>& m1, const unordered_map<char,int>& m2) {
return m1
因此,我试图将unordered_map设置为另一个unordered_map的值。现在,我遇到的问题是无法将值放入第二个unordered_map中。我的代码看起来是这样的。std::string postCode; std::unordered_map<std::string,unordered_map<int,Foo*>*> dat
墙壁用的std::unordered_map<int, std::unordered_map<int, AEntity*> >。另一个用于std::unordered_map<int, std::unordered_map<int, AEntity*> >的bombs+boxes。这就是我为什么想到unordered_maps的原因,我计划以这样的方式使用它们: KEY: y coord of the E