SORU
9 Mart 2009, PAZARTESİ


boost ile static_cast::shared_ptr?

boost::shared_ptr static_cast eşdeğer nedir?

Diğer bir deyişle, nasıl aşağıdakileri yazmak zorunda mıyım

Base* b = new Derived();
Derived* d = static_cast<Derived*>(b);

shared_ptr kullanırken?

boost::shared_ptr<Base> b(new Derived());
boost::shared_ptr<Derived> d = ???

CEVAP
9 Mart 2009, PAZARTESİ


Kullanım boost::static_pointer_cast:

boost::shared_ptr<Base> b(new Derived());
boost::shared_ptr<Derived> d = boost::static_pointer_cast<Derived>(b);

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Dion Coulls

    Dion Coulls

    16 AĞUSTOS 2006
  • Eric Enge

    Eric Enge

    2 Kasım 2009
  • parlophone

    parlophone

    28 ŞUBAT 2006