Skip to content

Instantly share code, notes, and snippets.

@seanh
Created December 1, 2010 15:02
Show Gist options
  • Select an option

  • Save seanh/723598 to your computer and use it in GitHub Desktop.

Select an option

Save seanh/723598 to your computer and use it in GitHub Desktop.
@interface MyClass : NSObject {
@private
BOOL myarray[32][24];
}
@end
#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