Skip to content

Instantly share code, notes, and snippets.

@akio0911
Created May 22, 2009 07:31
Show Gist options
  • Save akio0911/115997 to your computer and use it in GitHub Desktop.
Save akio0911/115997 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *myMutableArray = [NSMutableArray array];
[myMutableArray insertObject:[NSString stringWithString:@"1"]
atIndex:[myMutableArray count]];
[myMutableArray insertObject:[NSString stringWithString:@"2"]
atIndex:[myMutableArray count]];
[myMutableArray insertObject:[NSString stringWithString:@"3"]
atIndex:[myMutableArray count]];
[myMutableArray insertObject:[NSString stringWithString:@"4"]
atIndex:[myMutableArray count]];
[myMutableArray insertObject:[NSString stringWithString:@"5"]
atIndex:[myMutableArray count]];
NSLog(@"%@", myMutableArray);
[myMutableArray removeLastObject];
NSLog(@"%@", myMutableArray);
[pool release];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment