Hi,
I don't get the meaning of this question: change B and C inheritance to public and protected respectively
This are the classes and their inheritances that I have:
class A
{
public:
int a;
A(); //default constructor
A(int, int, int); //another constructor
~A(); //destructor
void printA(); //printA
protected:
int b;
private:
int c;
};
class B: public A
{
public:
string e;
B(); //default constructor
B(string, string, string); //another constrctor
~B(); //destructor
void printB(); //printB
protected:
string f;
private:
string g;
};
class C: public B
{
public:
string x;
C(); //default constructor
C(string, string, string); //another constructor
~C(); //destructor
void printC(); //printB
protected:
string y;
private:
string z;
};