Re: Allocating a C++ class from obj C
Re: Allocating a C++ class from obj C
- Subject: Re: Allocating a C++ class from obj C
- From: John Draper <email@hidden>
- Date: Wed, 16 Nov 2005 15:09:07 -0800
Philippe Casgrain wrote:
Le 05-11-15 à 04:51, John Draper a écrit :
Hi,
In my controller....
#import "infoServer.h"
- (id)initWithController:(mySipController *)controller
{
< I do some code - not important here >
mInfoServer = new infoServer(); <---- error: parse before
"(" token
}
You don't need the parentheses:
mInfoServer = new infoServer;
why AM I getting this error... ????????
By the way: the controller.mm file is set to: sourcecode.cpp.objcpp
In fact, the file that calls the obj C method - "initWithController"
is also set this way.
Does anyone see what I'm doing wrong? I've always been able to
mix C++ with Obj C, but in this case, nothing I try works....
My other question would have been "Is your file .m or .mm, it needs
to be .mm" but you have that covered.
right - but what gets me are all these restrictions when combining it
with Obj C classes in same
source module, and X-Code should automatically switch it to
"sourcecode-cpp-objc" mode, and
sometimes it doesn't set this, and has been a major "gotcha" in the past.
John
_______________________________________________
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