Re: ObjC question
Re: ObjC question
- Subject: Re: ObjC question
- From: "Hank Heijink (Mailinglists)" <email@hidden>
- Date: Mon, 21 Feb 2011 15:58:47 -0500
On Feb 21, 2011, at 3:19 PM, Tony Romano wrote: -(void) insert: (BTreeNode **) node node:(BTreeNode *) n { …
// get the address of the left member [self insert:&[(*node) left] node:n]; // <--- error }
The compiler(GCC 4.2 or LLVM 1.6) is giving this error : address _expression_ must be an lvalue or a function designator.
The syntax you want is simply this:
BTreeNode *leftNote = [(*node) left]; [self insert:&leftNode node:n]; The return value for [(*node) left] may be an lvalue, but the _expression_ isn't. I don't know of a syntax that will let you get the address you want in one _expression_. However, in the interest of readability, I would prefer the two-line solution regardless.
Best, Hank |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden