+ 3

Why Base b; is an error on this code:

class Base{ public: virtual void print()=0; }; int main(){ Base *p; Base b; }

1st Aug 2017, 1:58 AM
Gustave A C/D C ☢️ 🛸🛸🛸
Gustave A C/D C ☢️ 🛸🛸🛸 - avatar
1 Answer
+ 8
because an object can not be instanced from a virtual base class
1st Aug 2017, 2:02 AM
jay
jay - avatar