class Base
{
protected:
int bi; // Base Class' Integer
};
class Derived: public Base
{
public:
void func()
{
bi = 0;
di = 0;
}
private:
int di; // Derived Class' Integer
};
int main()
{
Derived d;
d.func(); // no problems here
}
Y2xhc3MgQmFzZQp7CnByb3RlY3RlZDoKCiAgICBpbnQgYmk7IC8vIEJhc2UgQ2xhc3MnIEludGVnZXIKfTsKCmNsYXNzIERlcml2ZWQ6IHB1YmxpYyBCYXNlCnsKcHVibGljOgoKICAgIHZvaWQgZnVuYygpCiAgICB7CiAgICAgICAgYmkgPSAwOwogICAgICAgIGRpID0gMDsKICAgIH0KCnByaXZhdGU6CgogICAgaW50IGRpOyAvLyBEZXJpdmVkIENsYXNzJyBJbnRlZ2VyCn07CgppbnQgbWFpbigpCnsKICAgIERlcml2ZWQgZDsKCiAgICBkLmZ1bmMoKTsgLy8gbm8gcHJvYmxlbXMgaGVyZQp9Cg==