• 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: Ben Dougall <email@hidden>
  • Date: Thu, 13 Nov 2003 23:21:43 +0000

NSArray *root, *one, *two, *three, *four, *five;
one = [[NSArray alloc] initWithObjects: @"a", @"b", @"c", @"d", @"e", nil];
two = [[NSArray alloc] initWithObjects: @"f", @"g", @"h", @"i", @"j", nil];
....
root = [[NSArray alloc] initWithObjects: one, two, three, four, five, nil];



also you could get rid of the contained array pointers buy doing:

NSArray *root;
root = [[NSArray alloc] initWithObjects:
[[NSArray alloc] initWithObjects: @"a", @"b", @"c", @"d", @"e", nil],
[[NSArray alloc] initWithObjects: @"f", @"g", @"h", @"i", @"j", nil],
...
nil ];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Two dimensional array (From: "Jay Rimalrick" <email@hidden>)

  • Prev by Date: Re: NSTask...Whois
  • Next by Date: What's NSError **?
  • Previous by thread: Two dimensional array
  • Next by thread: Re: Two dimensional array
  • Index(es):
    • Date
    • Thread