#include <iostream>
class A
{
};
class B : public A
{
public:
int i;
virtual void Func() = 0;
};
class C : public B
{
public:
char c;
void Func() {}
};
int main()
{
C* pC = new C;
A* pA = (A*)pC;
std::cout << "pC == " << std::hex << pC << "\n";
std::cout << "pA == " << std::hex << pA << "\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQQp7Cn07CgpjbGFzcyBCIDogcHVibGljIEEKewpwdWJsaWM6CmludCBpOwp2aXJ0dWFsIHZvaWQgRnVuYygpID0gMDsKfTsKCmNsYXNzIEMgOiBwdWJsaWMgQgp7CnB1YmxpYzoKY2hhciBjOwp2b2lkIEZ1bmMoKSB7fQp9OwoKaW50IG1haW4oKQp7CkMqIHBDID0gbmV3IEM7CkEqIHBBID0gKEEqKXBDOwpzdGQ6OmNvdXQgPDwgInBDID09ICIgPDwgc3RkOjpoZXggPDwgcEMgPDwgIlxuIjsKc3RkOjpjb3V0IDw8ICJwQSA9PSAiIDw8IHN0ZDo6aGV4IDw8IHBBIDw8ICJcbiI7CnJldHVybiAwOwp9