Re: dynamic cast problem
Re: dynamic cast problem
- Subject: Re: dynamic cast problem
- From: mark <email@hidden>
- Date: Fri, 25 May 2007 16:55:04 +1200
Title: Re: dynamic cast problem
class SORef {...};
class SelectedFORef : public SORef
{...};
SelectedFORef SOCastToSOF(SORef sor)
{
SelectedFORef sof=nil;
sof=dynamic_cast<SelectedFORef>(sor);
return sof;
};
I'm an idiot.
Above should be
class SOObject {...};
typedef class SOObject * SORef;
class SelectedFileObject : public SOObject {...};
typedef class SelectedFileObject * SelectedFORef;
SelectedFORef SOCastToSOF(SORef sor) {
SelectedFORef sof=nil;
sof=dynamic_cast<SelectedFORef>(sor);
return
sof;
};
I am getting a problem where sor
is not being cast to sof (stays nil) even though sor IS
a SelectedFORef underneath. (I have a debug method with details
contents and type).
I am not a C++ expert, but I can't see
why this won't cast.
What am I doing wrong?
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden