64,637
社区成员
发帖
与我相关
我的任务
分享
map<string,IObject> objMap; //IObject 是一个自己定义的类
objMap.insert(....);
objMap.insert(....);
objMap.insert(....);
map<string,IObject>::const_iterator mapIt = objMap.begin();
for(;mapIt != objMap.end(); mapIt++) {
cout<<mapIt->first()<<","<<mapIt->second()<<endl;//这里报错
}
map<string,IObject>::const_iterator mapIt = objMap.begin();
for(;mapIt != objMap.end(); mapIt++) {
cout<<mapIt->first()<<","<<mapIt->second()<<endl;//这里报错
}