#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:8], @"c",
[NSNumber numberWithInt:5], @"objective c",
[NSNumber numberWithInt:3], @"c++",
[NSNumber numberWithInt:6], @"python",
[NSNumber numberWithInt:2], @"java", nil];
for(id key in dict)
NSLog(@"key:%@ value:%@", key, [dict objectForKey:key]);
[pool drain];
return 0;
}
/*
run:
key:python value:6
key:objective c value:5
key:java value:2
key:c value:8
key:c++ value:3
*/