• 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: Two Dimensional Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two Dimensional Array


  • Subject: Re: Two Dimensional Array
  • From: Jamie Hardt <email@hidden>
  • Date: Fri, 12 Sep 2008 10:23:23 -0700

2 ways-

* Identically to C:

int myArray[X_SIZE][Y_SIZE];

This will perform much faster but will have all of the drawbacks of a dumb C array.

* Or with NSArray/NSMutableArray:

NSMutableArray *myArray = [NSMutableArray arrayWithObjects: [NSMutableArray array],[NSMutableArray array],nil];
etc...


This will perform more slowly but will be much less painful to work with.

What specifically are you trying to do?

On Sep 12, 2008, at 5:05 AM, Jordon Hirshon wrote:

I'm new to Objective-C. Can someone suggest an approach to building a two dimensional array of integers?

_______________________________________________

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: 
 >Two Dimensional Array (From: Jordon Hirshon <email@hidden>)

  • Prev by Date: Re: Two Dimensional Array
  • Next by Date: Leopard exception handling driving me crazy!
  • Previous by thread: Re: Two Dimensional Array
  • Next by thread: Re: Two Dimensional Array
  • Index(es):
    • Date
    • Thread