#include <iostream>
using namespace std;
class A {
public:
virtual void a() {
cout << "A::a" <<endl;
}
};
class B : public A {
public:
virtual void a() {
cout << "B::b" << endl;
A *aa = new A();
aa->a();
}
};
int main()
{
B *bb = new B();
bb->a();
return 0;
}