Dynamic cast problem
-
I migrated my project to VC2005 and found a pretty strange problem. The code tries to dynamic cast an object and the result is NULL even the objet type is valid. E.g. I have a following code:
class A; A* ptr = new A; ... A* pTest = dynamic_cast(ptr);
pTest is NULL but in the debugger I can see that "ptr" is A. The project has RTTI enabled. Any idea what could be the problem? Thanks, Abyss -
I migrated my project to VC2005 and found a pretty strange problem. The code tries to dynamic cast an object and the result is NULL even the objet type is valid. E.g. I have a following code:
class A; A* ptr = new A; ... A* pTest = dynamic_cast(ptr);
pTest is NULL but in the debugger I can see that "ptr" is A. The project has RTTI enabled. Any idea what could be the problem? Thanks, Abyss