drizztfun
Member
|
Extending Game Objects
Hello,
its me again with another newbie-question.
I am trying to extend the standard Game::Obj, after failing i tried to stick to the tutorial (09 Extending Game Object class), but i fail at the exact same point. Which is trying to cast the object.
if(MyObj *tile=CAST(MyObj,&obj))
gives me :
error C2683: 'dynamic_cast' : 'EE::Reference<TYPE>' is not a polymorphic type
Even with Google-Help i was not able to understand that problem, or better, why its happening, since the base-class has virtual functions and should be polymorphic then !?
additional info :
STRUCT(MyObj , Game::Obj)
{
// in my code i have ALL the functions etc. from the tutorial mentioned above..
}
But i am missing something i guess.. since its compiletime-error its a c++ problem i guess.
(i am so used to object oriented programming in delphi, but with c++ i feel like i turn on the computer a first time in my life...)
|
|
02-27-2011 06:39 PM |
|
Esenthel
Administrator
|
RE: Extending Game Objects
if(MyObj *tile=CAST(MyObj,obj()))
|
|
02-28-2011 01:05 AM |
|
drizztfun
Member
|
RE: Extending Game Objects
Thank you for your quick reply
I really just did not see the parenthesis, c++ is not my friend yet
|
|
02-28-2011 05:49 AM |
|