You are misreading the error, it is telling you that the default constructor for derived
is not accessible (is private
) so that you cannot use that to create an object of that type. Now making it public
at the derived
level won't help, since the base
constructor is also private
and thus cannot be used within the constructor of derived
.
Why do you want those constructors to be private
?