• 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: Newbie question about _NSSize and NSSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question about _NSSize and NSSize


  • Subject: Re: Newbie question about _NSSize and NSSize
  • From: "Paulo F. Andrade" <email@hidden>
  • Date: Mon, 27 Aug 2007 12:52:54 +0100

Actually it isn't just another name for _NSSize. It's more like an alias for struct Something.
An example should clear this up:


struct _NSSize size;

is the same as

NSSize size;

And if I recall correctly you may not specify the name of the structure, you could declare it like this:

typedef struct {
	float width;
	float height;
} NSSize;

Paulo F. Andrade 52439@IST
mailto: email@hidden



On 2007/08/27, at 12:43, Frank Bettger wrote:

In Hillegass book there is a challenge in chapter 5. It says

The second argument is a C struct that contains the size that the user has
asked for:


typedef struct _NSSize {
    float width;
    float height;
} NSSize;

If I understand the construction above NSSize is just another name for
_NSSize. My question is what's the purpose of giving two nearly identical
names for a structure?
_______________________________________________


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:
40mega.ist.utl.pt


This email sent to email@hidden

_______________________________________________

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: Newbie question about _NSSize and NSSize
      • From: "Frank Bettger" <email@hidden>
References: 
 >Newbie question about _NSSize and NSSize (From: "Frank Bettger" <email@hidden>)

  • Prev by Date: Newbie question about _NSSize and NSSize
  • Next by Date: Re: Newbie question about _NSSize and NSSize
  • Previous by thread: Newbie question about _NSSize and NSSize
  • Next by thread: Re: Newbie question about _NSSize and NSSize
  • Index(es):
    • Date
    • Thread