When the direct base class inherits the indirect base class in a private way, the derived class of the direct base class cannot define the object of the indirect base class in the class. Why?
class Try
{
public:
Try() = default;
};
class B1 : private Try
{};
class C1 : public B1
{
Try a;
};
the Try a will be error
Aucun commentaire:
Enregistrer un commentaire