के समतुल्य boost::shared_ptr
के साथ क्या है?static_cast :: shared_ptr?
दूसरे शब्दों में, कैसे मैं निम्नलिखित
Base* b = new Derived();
Derived* d = static_cast<Derived*>(b);
जब shared_ptr
का उपयोग कर फिर से लिखने की क्या ज़रूरत है?
boost::shared_ptr<Base> b(new Derived());
boost::shared_ptr<Derived> d = ???
चाहिए यह नहीं' बेस * ख = नए व्युत्पन्न() को परिभाषित नहीं करता? – legends2k