• 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: Shawn Erickson <email@hidden>
  • Date: Thu, 13 Nov 2003 18:19:26 -0800

On Nov 13, 2003, at 2:10 PM, Jay Rimalrick wrote:

How do you create a two dimensional static array in objective c?

in c++ I would do this

myArray[5][5] = {a,b,c,d,e},
{f,g,h,i,j},
{k,l,m,n,o},
{p,q,r,s,t}
{u,v,w,x,y};

how can I do this in objective c and how can I access the members?

The above is not C++ it is plain old C. Objective-C is a superset of C so you can do the above.

The only gotcha could be with compiler conformance... you may need C99 to keep things happy (not sure myself with looking it up). Apple's GCC 3.3 used by xCode and updated ProjectBuilder supports C99 among other specs.

-Shawn
_______________________________________________
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.

  • Prev by Date: Re: Quartz 2D drawing problems
  • Next by Date: Re: Two dimensional array
  • Previous by thread: Re: Two dimensional array
  • Next by thread: Re: Two dimensional array
  • Index(es):
    • Date
    • Thread