• 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: Passing by reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing by reference


  • Subject: Re: Passing by reference
  • From: "\"Clark S. Cox ?\"" <email@hidden>
  • Date: Thu, 24 Jun 2004 20:29:52 -0400

On Thursday, June 24, 2004, at 05:06PM, Darrin Cardani <email@hidden> wrote:

>I have some C++ code I'm attempting to include in an ObjC++ project.
>The code contains some functions that take parameters passed by
>reference. If I include the header containing those functions in an
>Objective-C source file, I get a compile error:
>
>error: parse error before '&' token
>
>I have the file type of the header set to sourcecode.cpp.h. I've also
>tried sourcecode.cpp.objcpp, but that didn't help either.

The filetype of the header is irrelevant. It's the type of the file(s) that it is included in that matter. Make sure that this file is only included in C++ and ObjectiveC++ files, and/or wrap the C++ specific declarations with #ifdef __cplusplus ... #endif.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: cocoa-dev digest, Vol 2 #4404 - 14 msgs
  • Next by Date: Re: multiple windowcontrollers
  • Previous by thread: Passing by reference
  • Next by thread: memory leaks
  • Index(es):
    • Date
    • Thread