Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <objc/objc.h>
- #import <Foundation/Foundation.h>
- #import <objc/NSArray.h>
- int main ( int argc, char ** argv)
- {
- int ar[100] = {0};
- int i;
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSArray *arr = [[NSArray alloc] initWithObjects:@"stackOverflow", @"1", @"2", nil];
- NSLog (@ "Counts in the array %i", [arr count]);
- @try {
- NSString *str;
- str = [arr objectAtIndex:1];
- NSLog (@" String value is %@ ", str);
- }
- @catch (NSRangeException * excep)
- {
- NSLog (@"Reached Range caught for %@:%@" [excep name], [excep reason]);
- }
- [pool release];
- }
Add Comment
Please, Sign In to add comment