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

Passing by reference


  • Subject: Passing by reference
  • From: Darrin Cardani <email@hidden>
  • Date: Thu, 24 Jun 2004 16:06:14 -0500

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. I know this can work as I have another project that it works in just fine. What am I missing here?

Here's what the header looks like:

typedef float FloatMatrix[3][3];

void MultiplyMatrices (FloatMatrix& matA, FloatMatrix& matB, FloatMatrix& result);

The error occurs on the function prototype. Is there something I need to set or something else I need to do to make this work?

Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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: Problem with NSFileHandle?
  • Next by Date: Re: multiple windowcontrollers
  • Previous by thread: Re: Problem with NSFileHandle?
  • Next by thread: Re: Passing by reference
  • Index(es):
    • Date
    • Thread