在项目类别中,我有这样的意思。
enum EquipSlot
{
RightHand,
Head,
...
};
品级
void Character::UnequipSlot(Item::EquipSlot slot);
item class is not in any namespace or a part of another class.
i use Item::EquipSlot in implementation a lot with no error. it only gives compile error while in declaration.
What s the correct way to call enum of another class?
(compiler is vc++ 9) error is : error C2027: use of undefined type Item (item class is used in other declarations)
感谢。