1
我创建了一个类Adresy
:C++使用枚举从另一个类
class Adresy {
public:
static const DWORD hp = 0x947000;
static const DWORD mp = 0x7B2084;
static const DWORD cap = 0x97EE94;
enum Flags
{
None = 0,
Poisoned = 1,
Burning = 2,
ProtectedByMagicShield = 16
};
};
当我尝试在这个例子中使用它:
if(((DWORD) adr.ProtectedByMagicShield & pFlags) == (DWORD) ProtectedByMagicShield){
//...
}
它说引发错误:'ProtectedByMagicShield' : undeclared identifier...
pFlags
是一个DWORD
,我正在使用C++。NET。
thx,它的工作:) – Luke 2012-07-06 19:28:46