Ray's playground

 

Working with Collections(Chapter 7 of Objective-C Phrasebook)

 1 #import <Foundation/Foundation.h>
 2 
 3 int main (int argc, const char * argv[])
 4 {
 5 
 6     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
 7 
 8     NSArray *array= [[NSArray alloc] initWithObjects:@"Ray"@"Summer", nil];
 9     NSEnumerator *= [array objectEnumerator];
10     for(id obj=[e nextObject]; obj!=nil; obj=[e nextObject])
11     {
12         NSLog(@"%@ ", obj);
13     }
14 
15     [pool drain];
16     return 0;
17 }

posted on 2011-04-15 09:26  Ray Z  阅读(186)  评论(0)    收藏  举报

导航