Re: can C++ object use Object C objects?
Re: can C++ object use Object C objects?
- Subject: Re: can C++ object use Object C objects?
- From: Scott Andrew <email@hidden>
- Date: Fri, 2 Sep 2005 14:56:37 -0700
So my derived class just has to live in a .mm extension?? Thats it?
Are there any limitations?
so my .h can have:
class CMyMacClass : public CMyXPlatClass
{
NSString* pstring;
NSString* GetString();
}
cool. So then I just need to write a thin object wrapper so my object
can live in a NSArrayController. that would just stash this object
then return the string.
Scott
On Sep 2, 2005, at 2:36 PM, KJ Walker wrote:
On Sep 2, 2005, at 14:19, Scott Andrew wrote:
Ok. i thought i had seen docs on this but can't find it.
Using the GNU compiler can a C++ object use ObjectC objects? Can i
say
void foo::myfunc()
{
[object message];
}
can C++ use and return objective C objects?
If the file is being processed as Objective-C++ then yes. To have
a file compiled in this way it needs to have a .mm extension (I
believe) if using the default settings, or settings that affect
that file need to be set specifically to Objectice-C++.
For return types it would have to be a pointer to a Obj-C object,
but since that is the way they are typically represented in code
that's a pretty moot point.
KJ
Senior Mac Developer
SmartSound Software, Inc.
_______________________________________________
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