64,641
社区成员
发帖
与我相关
我的任务
分享
翻阅c++ premier时发现一个问题class Base
{
public:
virtual Base *clone() const {return new Base(*this);}
} ;
class Derived: public Base
{
public:
Derived* clone() const{return new Derived(*this);}
} ;
error C2555: 'Derived::clone' : overriding virtual function differs from 'Base::clone' only by return type or calling convention