j
k
j a
j l
boost::shared_ptr<DerivedClass> ptr = boost::dynamic_pointer_cast<DerivedClass>(en); //Error when push_back. Instead of ptr, I get 0 result.push_back(ptr);
boost::shared_ptr<DerivedClass> ptr = boost::dynamic_pointer_cast<DerivedClass>(en);
//Error when push_back. Instead of ptr, I get 0 result.push_back(ptr);
Are you sure ptr is non-zero? Probably, dynamic_pointer_cast failed and returned 0.
Back to the thread
Back to the list