Created
December 1, 2010 15:02
-
-
Save seanh/723598 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface MyClass : NSObject { | |
| @private | |
| BOOL myarray[32][24]; | |
| } | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "MyClass.h" | |
| @implementation MyClass | |
| -(id) init | |
| { | |
| if( (self=[super init] )) | |
| { | |
| // Initialise myarray. | |
| const int num_columns = sizeof(myarray)/sizeof(myarray[0]); | |
| const int num_rows = sizeof(myarray[0])/sizeof(myarray[0][0]); | |
| for (int x=0; x<num_columns; x++) | |
| { | |
| for (int y=0; y<num_rows; y++) | |
| { | |
| myarray[x][y] = ... ; | |
| } | |
| } | |
| } | |
| return self; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment