Re: Using C++ AutoPtr within an Obj C file.
Re: Using C++ AutoPtr within an Obj C file.
- Subject: Re: Using C++ AutoPtr within an Obj C file.
- From: Scott Ribe <email@hidden>
- Date: Thu, 04 Aug 2005 20:15:09 -0600
> First off, I was told I had to change the .m suffix to .mm suffix if I
> intend to
> call C++ code implemented in .cxx files. Not sure if Apple supports
> the .cxx
> suffix - nor could I find anything that says I shouldn't. Should I
> leave the files
> as .cxx?
.cpp is a C++ file, not an Objective-C++ file.
> For instance, the statement:
>
> auto_ptr<ClientAuthManager> clientAuth(new ClientAuthManager);
The auto_ptr class has a constructor, so you can't embed it directly in an
Objective-C object (unless you use the new Tiger-only compile option).
> I intend to use this C++ construct in my "init" method of my
> "controller.mm" file. Is this
> permitted?
Well, it's permitted, but it will only create a local variable, not an ivar
of an Objective-C class...
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 665-7007 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden