Skip to content

Instantly share code, notes, and snippets.

@soh335
Created June 28, 2010 03:21
Show Gist options
  • Save soh335/455410 to your computer and use it in GitHub Desktop.
Save soh335/455410 to your computer and use it in GitHub Desktop.
#gcc test.m -o test -framework Cocoa && ./test
2010-06-28 12:20:54.139 test[19502:903] hoge
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *a = [NSMutableArray array];
NSArray *b = [NSArray arrayWithObjects:@"hoge", @"fuga", nil];
[a addObject:b];
NSLog(@"%@", [[a objectAtIndex:0] objectAtIndex:0]);
[pool drain];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment