• 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: Struct Data Types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Struct Data Types


  • Subject: Re: Struct Data Types
  • From: Richard Somers <email@hidden>
  • Date: Thu, 16 Aug 2007 19:25:11 -0600


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.

Also in the Foundation Data Types Reference we read the following.

    NSRectPointer
    Type indicating a parameter is a pointer to an NSRect structure.

    typedef NSRect *NSRectPointer;

So I thought the parameter (NSRect) was defined to be a pointer to a NSRect structure.

Regards, Richard Somers

_______________________________________________

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


  • Follow-Ups:
    • Re: Struct Data Types
      • From: Andrew Farmer <email@hidden>
References: 
 >Struct Data Types (From: Richard Somers <email@hidden>)
 >Re: Struct Data Types (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Struct Data Types
  • Next by Date: Re: Struct Data Types
  • Previous by thread: Re: Struct Data Types
  • Next by thread: Re: Struct Data Types
  • Index(es):
    • Date
    • Thread