• 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 reference to reference to variable from ObjC++ to method of C++ class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing reference to reference to variable from ObjC++ to method of C++ class


  • Subject: Re: passing reference to reference to variable from ObjC++ to method of C++ class
  • From: Alexander Spohr <email@hidden>
  • Date: Thu, 11 Dec 2003 13:40:09 +0100

hm.. just an idea:

try passing &name (and receiving it on the other side as char ** or char *[]).

a char[] is NOT exactly working like a char*.
yes, it generaly is a pointer to the first char, but if you pass it to a function it might be that the comiler tries to copy the contents, instead of just giving the pointer to the function.

did you try to pass a malloced char*?

atze


Am 11.12.2003 um 11:29 schrieb Shashikant Hire:

Hello

Is it possible to pass reference to char array from ObjC++ code to method of
C++ object?

For example

char name[512];

cppObj = new CppClass();
cppObj->setName(name);

After debugging using GDB I found that reference to name is null. Cpp
library is CFM-based.

SBH
_______________________________________________
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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: passing reference to reference to variable from ObjC++ to method of C++ class
      • From: David Leimbach <email@hidden>
References: 
 >passing reference to reference to variable from ObjC++ to method of C++ class (From: "Shashikant Hire" <email@hidden>)

  • Prev by Date: Acknowledging a successful drop operation
  • Next by Date: Re: Acknowledging a successful drop operation
  • Previous by thread: passing reference to reference to variable from ObjC++ to method of C++ class
  • Next by thread: Re: passing reference to reference to variable from ObjC++ to method of C++ class
  • Index(es):
    • Date
    • Thread