我收到奇怪的错误,说无法将类型转换为自身!
谁能告诉我这里出了什么问题!?
public ref class Weapon{
private :
int Slot_, Id_, Ammo_;
System::String^ Name_;
public :
Weapon(EWeapons Id, int Ammo) : Id_((int)Id), Ammo_(Ammo){}
Weapon(int Id, int Ammo) : Id_(Id), Ammo_(Ammo){}
//other part of code...
}
property OSamp::Weapon Weapon{
OSamp::Weapon get(){
return OSamp::Weapon(1, 1000);
// error C2440: 'return' : cannot convert from 'OSamp::Weapon' to 'OSamp::Weapon'
}
}