[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

dynamic_cast

puzzlecracker

9/29/2008 7:51:00 PM

Is it possible for a dynamic_cast to return a non-null pointer even
though source pointer and target pointer don't belong to class
hierarchy?
1 Answer

Victor Bazarov

9/29/2008 8:42:00 PM

0

puzzlecracker wrote:
> Is it possible for a dynamic_cast to return a non-null pointer even
> though source pointer and target pointer don't belong to class
> hierarchy?

Please post code. Could it be that you're passing a non-class pointer
to the cast, like a void*?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask