Original Post
Hi, with classes in c++, I am curious if its possible to do classes like this for example: I am wondering if its possible to make 'increaseLight()' be able to access the private brigtness class? Thankyou
class Base {
protected:
void increaseLight();
};
class Light: public Base {
private;
int brightness;
};
void Light::increaseLight() {
brightness++; // I get a can't access private error here
}