1

So let's say I've got 2 classes like this :

Shape

class Shape
{
private:
    //private members

public:
    //public members
};

Triangle

class Triangle : Shape
{
private:
    //private members
public:
    //public members
};

What is the difference between class Triangle : public Shape and class Triangle : Shape if there's any ?

  • not sure if that is in the duplciate: When using the keyword `class` the default access specifier is `private` (`public` when using the keyword `struct`). The rest is explained in the duplicate – 463035818_is_not_an_ai Dec 09 '20 at 10:52

0 Answers0