R
Roy Smith
I want to have three classes; Parent, Child1, and Child2. Parent is to be
an abstract base class with Child1 and Child2 concrete classes derived from
Parent.
Normally, to do that, Parent would have some virtual method defined as
"=0", and implemented in the two children. The problem I have is that the
only difference between the three classes is in the constructor. In fact,
the two child classes won't define any methods at all other than their
constructors.
What's the best way to make it impossible to instantiate an instance of
Parent in a situation like this?
an abstract base class with Child1 and Child2 concrete classes derived from
Parent.
Normally, to do that, Parent would have some virtual method defined as
"=0", and implemented in the two children. The problem I have is that the
only difference between the three classes is in the constructor. In fact,
the two child classes won't define any methods at all other than their
constructors.
What's the best way to make it impossible to instantiate an instance of
Parent in a situation like this?