• 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
Problems with [NSArray count]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with [NSArray count]


  • Subject: Problems with [NSArray count]
  • From: Peter Browne <email@hidden>
  • Date: Tue, 22 Apr 2008 22:03:11 +0100

Hi,

I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty...

All I want to do is find out the number of items in an NSArray and store that as a variable, which I can then find the square root of.

The docs tell me that [NSArray count] returns an NSUInteger, but exactly WHAT one of these is, or how I use it is baffling me.

a simple

	int i = [myArray count];

crashes out, and I've tried various other types of variable to no avail. Any thoughts? Am I missing something blindingly obvious here?

Thanks,
Peter


_______________________________________________

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: Problems with [NSArray count]
      • From: Andy Lee <email@hidden>
    • Re: Problems with [NSArray count]
      • From: David Duncan <email@hidden>
    • Re: Problems with [NSArray count]
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: GUI Time Field
  • Next by Date: Re: Problems with [NSArray count]
  • Previous by thread: Re: GUI Time Field
  • Next by thread: Re: Problems with [NSArray count]
  • Index(es):
    • Date
    • Thread