• 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: sizeof(unsigned long long)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sizeof(unsigned long long)


  • Subject: Re: sizeof(unsigned long long)
  • From: Nick Zitzmann <email@hidden>
  • Date: Sat, 27 Sep 2008 16:19:33 -0600


On Sep 27, 2008, at 3:49 PM, Daniel Luis dos Santos wrote:

When I do sizeof(unsigned long long) i get 8.
Afterwards I try to shift each unsigned char into its position along the destination unsigned long long variable, but I get a warning from the compiler that I am shifting beyond the type's capacity. That is not surprising since I am targeting 32 bit.
Then I don't understand why the size of returns 8. Shouldn't it return 4 ?


No; long longs are always 8 bytes (64 bits). Ints are 4 bytes (32 bits) on both 32-bit and 64-bit architectures.

Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________

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


References: 
 >sizeof(unsigned long long) (From: Daniel Luis dos Santos <email@hidden>)

  • Prev by Date: Re: setPrimitiveValue:forKey: and to-many relationships
  • Next by Date: Re: sizeof(unsigned long long)
  • Previous by thread: sizeof(unsigned long long)
  • Next by thread: Re: sizeof(unsigned long long)
  • Index(es):
    • Date
    • Thread