• 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: Allocating a C++ class from obj C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Allocating a C++ class from obj C (From: John Draper <email@hidden>)
 >Re: Allocating a C++ class from obj C (From: Adin Hunter Baber <email@hidden>)
 >Re: Allocating a C++ class from obj C (From: John Draper <email@hidden>)

  • Prev by Date: Re: Can't get Xcode & Perforce to work (Xcode bug!)
  • Next by Date: Re: Separate targets by localisation
  • Previous by thread: Re: Allocating a C++ class from obj C
  • Next by thread: Re: Allocating a C++ class from obj C
  • Index(es):
    • Date
    • Thread