#include<iostream>
using namespace std;
class Derived;
class Base {
private:
virtual void fun() { cout << "Base Fun"; }
friend int main();
};
class Derived: public Base {
public:
void fun() { cout << "Derived Fun"; }
};
int main()
{
Base *ptr = new Derived;
ptr->fun();
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpjbGFzcyBEZXJpdmVkOwoKY2xhc3MgQmFzZSB7CnByaXZhdGU6CiAgICB2aXJ0dWFsIHZvaWQgZnVuKCkgeyBjb3V0IDw8ICJCYXNlIEZ1biI7IH0KZnJpZW5kIGludCBtYWluKCk7Cn07CgpjbGFzcyBEZXJpdmVkOiBwdWJsaWMgQmFzZSB7CnB1YmxpYzoKICAgIHZvaWQgZnVuKCkgeyBjb3V0IDw8ICJEZXJpdmVkIEZ1biI7IH0KfTsKCmludCBtYWluKCkKewogICBCYXNlICpwdHIgPSBuZXcgRGVyaXZlZDsKICAgcHRyLT5mdW4oKTsKICAgcmV0dXJuIDA7Cn0K