class ClassA {
public:
ClassA() {} // when this function must be provided
virtual ~ClassA() = 0 {}
};
class ClassB : public ClassA
{
// ...
};
I want to know when the default constructor of an abstract base class must be provided.
there is no connection between providing a default constructor, and the abstractness or not of the class.
provide a default constructor definition if you need to initialize things.
provide a (possibly non-implemented) non-public declaration if you want to prohibit default construction.
cheers & hth.,