• 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: method declaration error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: method declaration error


  • Subject: Re: method declaration error
  • From: "Jonathan del Strother" <email@hidden>
  • Date: Thu, 27 Mar 2008 13:36:36 +0000

On Thu, Mar 27, 2008 at 12:21 PM, Nick Rogers <email@hidden> wrote:
> i'm declaring the following method:
>
>  - (BOOL)searchNodeTarget:(const ItemType)target
>                 location:(int &)location;
>
>  with error: "parse error before '&' token".
>
>  can we not use (int &) this way?


Reference parameters are a C++ feature.  You can either use
(int*)location, or compile as Objective-C++ by changing your header
extension to .hh
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >method declaration error (From: Nick Rogers <email@hidden>)

  • Prev by Date: Rép : method declaration error
  • Next by Date: to include a C++ class in proj
  • Previous by thread: method declaration error
  • Next by thread: Rép : method declaration error
  • Index(es):
    • Date
    • Thread