public ref class masterWeapon{
public :
property int Slot {
int get(){
return 0;
}
}
masterWeapon(){
}
};
OSamp::masterWeapon mw();
int v = mw.Slot; //ERROR error C2228: left of '.Slot' must have class/struct/union
但是以下代码运行良好:
public ref class masterWeapon{
public :
property int Slot {
int get(){
return 0;
}
}
masterWeapon(int useless){
}
};
OSamp::masterWeapon mw(231312);
int v = mw.Slot; //works fine