RE: static typing (Learning Cocoa Chapter 13)
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