【发布时间】:2015-01-16 16:47:20
【问题描述】:
您能否解释一下为什么会发生以下错误以及如何解决该问题?它给我带来了很多问题,所以我需要你的帮助
错误(编译错误)-
the object has type qualifiers that are not compatible with the member function
*items 成员是一个集合
问题线——
temp.setName(items.find(itemList[option])->getName());
setName 和 getName 函数 -
void Item::setName(string name)
{
this->_name = name;
}
string Item::getName()
{
return this->_name;
}
【问题讨论】:
标签: c++ function compiler-errors set