
I'm trying to use enable_shared_from_this with my classes that have an
inheritance structure and a virtual function.
I'd like to get a shared pointer to the descendant class B. I get a
compile error when I try to dynamic cast the shared ptr of type A to a
shared_ptr of type B. See the attached sample.
--
sashan
http://www.cs.auckland.ac.nz/~sgov008/
#include <iostream>
#include

sashan wrote:
I'm trying to use enable_shared_from_this with my classes that have an inheritance structure and a virtual function. I'd like to get a shared pointer to the descendant class B. I get a compile error when I try to dynamic cast the shared ptr of type A to a shared_ptr of type B. See the attached sample.
Damn...ignore that post - i've posted the wrong code
participants (1)
-
sashan