Inspired by: C ++ - why should we define a pure virtual destructor outside the class definition?
What does the following code do?
class Object { public: virtual ~Object() = 0; }; Object::~Object() { /*...*/ }
I thought the point of a pure virtual function was to force subclasses to implement this particular function. If so, then why bother with implementing the same function in a virtual base class?
This code does not allow you to instantiate an object and at the same time allows you to create subclasses.
, . , . - , , Foo:theFunc().
Foo:theFunc()
"" - . . , ( ) - .
, :