I have 3 classes, 1 inherited by another. A->B->C. A has a protected member function that I'm trying to set using C.
I'm getting C2248 - Error C2248 'A::status': cannot access inaccessible member declared in class 'A' Associations
Am I not allowed to access to the variable in class C?
class A {
public:
A();
~A();
protected:
char status[4];
};
class B: class A {
public:
B();
~B();
};
class C: class B {
public:
C(char newStatus[4]);
};
C::C(char newStatus[4])
{
this.status = newStatus;
}