... type bp3->print(); shared_ptr<Derived1> dp3 = dynamic_pointer_cast<Derived1>(bp3); // downcast to valid type if(dp3) dp3->print(); else cout << "dynamic ...
確定! 回上一頁