Re: Trouble with passing variables
Re: Trouble with passing variables
- Subject: Re: Trouble with passing variables
- From: Andy Lee <email@hidden>
- Date: Tue, 28 Feb 2006 15:51:14 -0500
On Feb 28, 2006, at 3:30 PM, Mark Williams wrote:
Ok I am trying something like the following:
-(BOOL)numberAdded:(int*)number
{
*number++;
Change that to
(*number)++;
The ++ has higher precedence than the *, so you were incrementing the
pointer and then dereferencing it, rather than dereferencing it and
incrementing its contents.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden