Created
June 1, 2009 04:09
-
-
Save akio0911/121222 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
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableArray* array = [NSMutableArray array]; | |
[array addObject:[NSArray array]]; | |
[array addObject:[NSNull null]]; | |
[array addObject:[NSArray array]]; | |
[array addObject:[NSNull null]]; | |
NSLog(@"%@", array); | |
NSLog(@"%d", [array indexOfObject:[NSNull null]]); | |
[array replaceObjectAtIndex:[array indexOfObject:[NSNull null]] withObject:[NSArray array]]; | |
NSLog(@"%@", array); | |
NSLog(@"%d", [array indexOfObject:[NSNull null]]); | |
[pool release]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment