M
matish
Hi,
should
dynamic_cast<ClassName*>(pointer)
always succeed if
typeid(*pointer).name() == string("ClassName")?
I experienced an unexplainable (to me) behaviour in witch if I call a
virtual function on a pointer of a superclass A the method of the actual
subclass B is (correctly) called, but if I dynamic_cast the pointer to B
the cast returns NULL even if typeid says that the object is of type
B... I'm trying to guess if the one to blame is just myself or I have
any chance to be in front of some kind of compiler bug (witch I consider
quite unlikely)
thx
Matteo
should
dynamic_cast<ClassName*>(pointer)
always succeed if
typeid(*pointer).name() == string("ClassName")?
I experienced an unexplainable (to me) behaviour in witch if I call a
virtual function on a pointer of a superclass A the method of the actual
subclass B is (correctly) called, but if I dynamic_cast the pointer to B
the cast returns NULL even if typeid says that the object is of type
B... I'm trying to guess if the one to blame is just myself or I have
any chance to be in front of some kind of compiler bug (witch I consider
quite unlikely)
thx
Matteo