我的谷歌技能让我失望了=(
我有以下地图:
std::map<std::string, std::map<std::string, std::string>> spriteSheetMap;
我正在尝试这样做:
for (auto &animationKey : killerRabbit->spriteSheetMap) {
for (auto &animation : animationKey) {
//why doesn't this work?
}
}
实际错误:
Invalid range expression of type 'std::__1::pair<const std::__1::basic_string<char>, std::__1::map<std::__1::basic_string<char>, std::__1::basic_string<char>, std::__1::less<std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::basic_string<char> > > > >'; no viable 'begin' function available