Re: Struct Data Types
Re: Struct Data Types
- Subject: Re: Struct Data Types
- From: Andrew Farmer <email@hidden>
- Date: Thu, 16 Aug 2007 18:35:54 -0700
On 16 Aug 07, at 18:25, Richard Somers wrote:
On Aug 16, 2007, at 7:08 PM, Andrew Farmer wrote:
(NSRect) is a structure; (NSRect *) is a pointer to a structure.
I thought (NSRect) was a pointer to a structure because in
NSGeometry.h we find the following.
typedef struct _NSRect {
NSPoint origin;
NSSize size;
} NSRect;
typedef NSRect *NSRectPointer;
I guess I do not understand the what the second typedef does or how
it is used.
It declares that the type NSRectPointer is a pointer to a NSRect. Hence,
NSRect *rp;
is functionally equivalent to
NSRectPointer rp;
This doesn't affect the definition of NSRect, though.
_______________________________________________
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