• 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: Accessors for 2D Arrays?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessors for 2D Arrays?


  • Subject: Re: Accessors for 2D Arrays?
  • From: Ian was here <email@hidden>
  • Date: Tue, 1 Nov 2005 20:09:57 -0800 (PST)

I've never seen methods declared in this manner
before:

- (int)gM[4][4];
- (void)setGM[4][4]: (int)aGM[4][4];


What exactly are you trying to accomplish?




--- jz <email@hidden> wrote:

>
> #import <Cocoa/Cocoa.h>
> int gM[4][4] = {{0, 0, 0, 0,}, {0, 0, 0, 0,}, {0, 0,
> 0, 0,}, {0, 0, 0, 0,}};
>
> @interface MyController: NSObject {
>  - (int)gM[4][4];
>  - (void)setGM[4][4]: (int)aGM[4][4];
> }
>
> @implementation MyController
>
>  - (int)gM[4][4]
>  {
>      return gM[4][4];
>  }
>
>  - (void)setGM[4][4]:(int)aGM[4][4]
>  {
>      gM[4][4] = aGM[4][4];
>  }
>  The above accessors don't work.
> How to write accessors for a global array to replace
> one item and retain value of other items?
>
> I also tried: [gM[4][4] replaceObjectAtIndex: 1,1
> withObject: [NSNumber numberWithInt: 99] ]; but the
> compiler gives me an error "invalid integer gM"
>
> Thanks in advance."
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be
> ignored.
> Cocoa-dev mailing list
> (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
>
> This email sent to email@hidden
>




__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Accessors for 2D Arrays? (From: "jz" <email@hidden>)

  • Prev by Date: Accessors for 2D Arrays?
  • Next by Date: clarification (confirmation) about "autorelease" needed.
  • Previous by thread: Accessors for 2D Arrays?
  • Next by thread: Re: Accessors for 2D Arrays?
  • Index(es):
    • Date
    • Thread