Re: passing reference to reference to variable from ObjC++ to method of C++ class
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: David Leimbach <email@hidden>
- Date: Thu, 11 Dec 2003 08:39:43 -0600
Also if your function takes a reference to a char it is no where near
the same
as a pointer to a char. References are bound to some address and act
like
aliases and can't be moved once set.
That said I must confess I haven't done much with char * & to be able
to really
help further but it might provide a hint and since you say this is a
reference to
reference to variable in the subject I am somewhat confused as to what
you mean.
Dave
On Dec 11, 2003, at 6:40 AM, Alexander Spohr wrote:
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.
_______________________________________________
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.