+ 3
Why Base b; is an error on this code:
class Base{ public: virtual void print()=0; }; int main(){ Base *p; Base b; }
1 Antwort
+ 8
because an object can not be instanced from a virtual base class
class Base{ public: virtual void print()=0; }; int main(){ Base *p; Base b; }