Derived *pd2 = dynamic_cast<Derived *>(pb1); //编译错误:error: cannot dynamic_cast ‘pb1’ (of type ‘struct Base*’) to type ‘struct Derived*’ (source type is not polymorphic
Derived *pd4 = dynamic_cast<Derived *>(pb2); //编译错误:error: cannot dynamic_cast ‘pb2’ (of type ‘struct Base*’) to type ‘struct Derived*’ (source type is not polymorphic)