#include <iostream>
using namespace std;
class Itest{
public:
void fun(){cout<<"hello";};
int aaa;
};
class test:public Itest{
public:
void fun(){cout<<"hello world.";}
int a1;
};
int main(){
test* a=new test();
a->a1=10;
a->aaa=10;
Itest* b=a;
test* c=(test*) b;
cout<<c->a1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpjbGFzcyBJdGVzdHsKcHVibGljOgoJdm9pZCBmdW4oKXtjb3V0PDwiaGVsbG8iO307CglpbnQgYWFhOwp9OwpjbGFzcyB0ZXN0OnB1YmxpYyBJdGVzdHsKcHVibGljOgoJdm9pZCBmdW4oKXtjb3V0PDwiaGVsbG8gd29ybGQuIjt9CglpbnQgYTE7Cn07CmludCBtYWluKCl7Cgl0ZXN0KiBhPW5ldyB0ZXN0KCk7CglhLT5hMT0xMDsKCWEtPmFhYT0xMDsKCUl0ZXN0KiBiPWE7CgoJdGVzdCogYz0odGVzdCopIGI7Cgljb3V0PDxjLT5hMTsKCXJldHVybiAwOwp9