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: Adin Hunter Baber <email@hidden>
- Date: Tue, 15 Nov 2005 16:45:57 -0600
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.
Adin Hunter Baber
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