• 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: static typing (Learning Cocoa Chapter 13)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: static typing (Learning Cocoa Chapter 13)


  • Subject: RE: static typing (Learning Cocoa Chapter 13)
  • From: "Smith, Bradley" <email@hidden>
  • Date: Mon, 24 Sep 2001 11:42:44 +0100

I always prefer the latter version because: -

int *myIntPtr, myInt; // pointer to in and an actual int

Whereas: -

int* myIntPtr, myInt; // Reads like two items of type 'pointer to int'

Just my preference you understand ;-)
Brad

> Just to add an extra tidbit... the asterisk can appear
> _appended_ to the
> type, or _prepended_ to the variable. For example:
>
> NSButton* myButton //right
> NSButton *myButton //also right


  • Follow-Ups:
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: tracking
  • Next by Date: Re: Stopping a DO work
  • Previous by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Next by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Index(es):
    • Date
    • Thread