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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to