Accessors for 2D Arrays - thanks for help
Accessors for 2D Arrays - thanks for help
- Subject: Accessors for 2D Arrays - thanks for help
- From: "jz" <email@hidden>
- Date: Wed, 2 Nov 2005 11:52:56 -0500 (EST)
Greg, thanks for help I'll try your suggestions. I'm new to Obj-C.
You're right about out of bounds error. It wasn't part of my code. Only in my post.
Ian, I tried to set individual array elements from different classes without changing other elements, based on example in the book "Programming in Obj-C". So, I declared the array as global at the beginning of the program
int gM[4][4] = {{0, 0, 0, 0,}, {0, 0, 0, 0,}, {0, 0, 0, 0,}, {0, 0, 0, 0,}};
The statement:
gM[0][1] = 100;
assigned new value of 100, but without retaining other item values.
So, I attempted to write accessors (given in the original post) which didn't work.
_______________________________________________
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