错误 C2440“类型转换”: 无法从“int (__thiscall SpiritStone::* )(void) const”转换为“int”

QQ截图20220731211500.jpg
//修仙者的灵石战斗力辅助加成
SpiritStone stone;
for (unsigned int i = 0; i < stones.size(); i++) {
stone = stone + stones[i];
}
ret += (int)stone.getCount * STONE_COUNT_FACTOR;
解决: stone.getCount()后面加上括号
getCount()这个函数没有加括号,getCount()这个是一个函数方法,如果不加(),编译器执行的时候,
会执行它声明, int getCount()const; 编译器一看后面还加个const就乱了,而函数实现那里没有相关的const方法