VC6.0工程转VS2010工程出现的错误
问题:
error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认
VC6.0代码:
operator=(const CVector2<type>& rv)
{
this->x = rv.x;
this->y = rv.y;
};
解决方法:
VS2010代码
const CVector2& operator=(const CVector2<type>& rv)
{
this->x = rv.x;
this->y = rv.y;
return *this;
};//说明:CVector2为类