• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can C++ object use Object C objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can C++ object use Object C objects?


  • Subject: Re: can C++ object use Object C objects?
  • From: KJ Walker <email@hidden>
  • Date: Fri, 2 Sep 2005 14:36:40 -0700


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


  • Follow-Ups:
    • Re: can C++ object use Object C objects?
      • From: Scott Andrew <email@hidden>
References: 
 >can C++ object use Object C objects? (From: Scott Andrew <email@hidden>)

  • Prev by Date: can C++ object use Object C objects?
  • Next by Date: Re: can C++ object use Object C objects?
  • Previous by thread: can C++ object use Object C objects?
  • Next by thread: Re: can C++ object use Object C objects?
  • Index(es):
    • Date
    • Thread