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: Andy Kim <email@hidden>
- Date: Wed, 16 Nov 2005 18:16:46 -0800
I know this totally off-topic, but...
Hi Captain Crunch!
On Nov 16, 2005, at 3:10 PM, John Draper wrote:
Adin Hunter Baber wrote:
On 2005 Nov 15, at 3:51 AM, John Draper wrote:
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
}
The "mInfoServer" is an instance variable, declared as:
infoServer *mInfoServer;
In my infoserver.h
class infoServer
{
public:
infoServer();
< A bunch of other things I don't think is relevant >
};
why AM I getting this error... ????????
John
The line with the error should be:
mInfoServer = new infoServer;
You don't need the ()'s when you create an object with the
default constructor.
You only use them when you are passing parameters to a non-
default constructor.
And this is permissible when calling it from within an Obj C
method? right?
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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