In the first case, Employee C'tor cannot call its parent ( ObjectCount ) C'tor, because it is private.
In the second case, there is no problem for Employee C'tor to call the parent ctor, since it is public.
Note that this is important, as each class must use its own parent constructor before activating it.
Private inheritance means that other classes cannot use [or see] Employee as an ObjectCount , this does not change the visibility of the ObjectCount c'tor, to which the derived class must be accessible in any case.
source share