我的基本理解是没有纯虚函数的实现,但是,有人告诉我可能有纯虚函数的实现.
class A { public: virtual void f() = 0; }; void A::f() { cout<<"Test"<<endl; }
代码是否正常?
使其成为具有实现的纯虚函数的目的是什么?
c++ pure-virtual
c++ ×1
pure-virtual ×1