#include <iostream>
class Base{
public:
const static int Public= 0x01;
protected:
static const int Protected = 0x02;
private:
static const int Private = 0x03;
public:
Base(){}
void hoge(){
std::cout<<Public<<std::endl;
std::cout<<Protected<<std::endl;
std::cout<<Private<<std::endl;
}
};
class Derived:public Base{
public:
Derived(){}
void huga(){
std::cout<<Public<<std::endl;
std::cout<<Protected<<std::endl;
//std::cout<<Private<<std::endl;
}
};
int main(){
Derived D;
D.hoge();
D.huga();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQmFzZXsKcHVibGljOgoJY29uc3Qgc3RhdGljICBpbnQgUHVibGljPSAweDAxOwpwcm90ZWN0ZWQ6CglzdGF0aWMgY29uc3QgaW50IFByb3RlY3RlZCA9IDB4MDI7CnByaXZhdGU6CglzdGF0aWMgY29uc3QgaW50IFByaXZhdGUgPSAweDAzOwpwdWJsaWM6CgoJQmFzZSgpe30KCgl2b2lkIGhvZ2UoKXsKCQlzdGQ6OmNvdXQ8PFB1YmxpYzw8c3RkOjplbmRsOwoJCXN0ZDo6Y291dDw8UHJvdGVjdGVkPDxzdGQ6OmVuZGw7CgkJc3RkOjpjb3V0PDxQcml2YXRlPDxzdGQ6OmVuZGw7Cgl9Cn07CgpjbGFzcyBEZXJpdmVkOnB1YmxpYyBCYXNlewpwdWJsaWM6CglEZXJpdmVkKCl7fQoJdm9pZCBodWdhKCl7CgkJc3RkOjpjb3V0PDxQdWJsaWM8PHN0ZDo6ZW5kbDsKCQlzdGQ6OmNvdXQ8PFByb3RlY3RlZDw8c3RkOjplbmRsOwoJCS8vc3RkOjpjb3V0PDxQcml2YXRlPDxzdGQ6OmVuZGw7CQkKCX0KfTsKCgppbnQgbWFpbigpewoJRGVyaXZlZCBEOwoKCUQuaG9nZSgpOwoJRC5odWdhKCk7CgoJcmV0dXJuIDA7Cn0=