• 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: Trouble with passing variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with passing variables


  • Subject: Re: Trouble with passing variables
  • From: Jonathon Mah <email@hidden>
  • Date: Wed, 1 Mar 2006 12:16:49 +1030

Hi Mark,

On 2006-03-01, at 07:21, Andy Lee wrote:

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.

Just to clarify: Since you used the post-increment, you were incrementing the pointer and then dereferencing its _old_ (un- incremented) value.




Jonathon Mah
email@hidden


_______________________________________________ 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
References: 
 >Trouble with passing variables (From: Mark Williams <email@hidden>)
 >Re: Trouble with passing variables (From: Andy Lee <email@hidden>)

  • Prev by Date: objc_msgsend intel and nil objects
  • Next by Date: Re: objc_msgsend intel and nil objects
  • Previous by thread: Re: Trouble with passing variables
  • Next by thread: Re: Trouble with passing variables
  • Index(es):
    • Date
    • Thread