    struct A { int i; A(int i_) : i(i_) {} virtual const char* fn() { return "A"; } };
    struct B : public A {
    	int j;
    	B(int i_) : A(i_), j(i_ + 10) {}
        virtual const char* fn() { return "B"; }
    };

    #include <iostream>
    #include <cstring>
    
    int main()
    {
        A* a = new A(1);
        B* b = new B(2);
        *a = *b; // aka a->operator=(static_cast<A*>(*b));
        std::cout << "sizeof A = " << sizeof(A)
            << ", a->i = " << a->i << ", a->fn(): " << a->fn() << '\n';
    }       
