conversion to inaccessible base class is not allowed [duplicate] December 19, 2023 by Tarik class D1 :B1 Inheritance of classes is private by default, you should make it public: class D1 : public B1