Re: how to pass arguments by reference
Re: how to pass arguments by reference
- Subject: Re: how to pass arguments by reference
- From: Nick Rogers <email@hidden>
- Date: Wed, 10 Dec 2008 21:23:46 +0530
Hi, thanks for the reply.
Now I have:
- (UInt32)traverseTreeStraightReturnedDirection:(&int)treeDirection
returnedTreeDepth:(&int)treeDepth
returnedKey:(&HPlusCatalogKey)catKey
lookForKey:(HPlusCatalogKey)lastKey
{
// code here
}
Still the same error: parse error before & token
Thanks,
Nick
On 10-Dec-08, at 9:15 PM, Dave DeLong wrote:
Put the & before the variable type:
- (UInt32) traverseTreeStraightReturnedDirection:
(&int)treeDirection...
HTH,
Dave
On Dec 10, 2008, at 8:43 AM, Nick Rogers wrote:
Hi,
I have the following in my .m file:
- (UInt32)traverseTreeStraightReturnedDirection:(int&)treeDirection
returnedTreeDepth:(int&)treeDepth
returnedKey:(HPlusCatalogKey&)catKey
lookForKey:(HPlusCatalogKey)lastKey
{
// code here
}
But the error when compiling is "parse error before & token".
Is passing by reference not allowed or is there any other syntax
that I should follow?
Thanks,
Nick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden