Working with Collections(Chapter 7 of Objective-C Phrasebook)
2011-04-15 09:26
531 查看
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 *e = [array objectEnumerator];
for(id obj=[e nextObject]; obj!=nil; obj=[e nextObject])
{
NSLog(@"%@ ", obj);
}
[pool drain];
return 0;
}
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 *e = [array objectEnumerator];
for(id obj=[e nextObject]; obj!=nil; obj=[e nextObject])
{
NSLog(@"%@ ", obj);
}
[pool drain];
return 0;
}
相关文章推荐
- [bbk5128]第12集 - Chapter 06- Working with Composite Data Types -01-4998(Record)
- Memory Management(Chapter 3 of Objective-C Phrasebook)
- [bbk5153]第15集 - Chapter 06- Working with Composite Data Types(Collection)
- Working with Files(Chapter 16 of Programming in Objective-C 2.0)
- Working with persistent objects(Chapter 4 of Hibernate In Action)
- Working with view controllers(Chapter 5 of The iPhone™ Developer’s Cookbook)
- Manipulating Strings(Chapter 6 of Objective-C Phrasebook)
- Chapter 7. Working with ASP.NET and VB .NET
- Chapter 2: Working with OFBiz
- Working with Characters and Strings(Chapter 2 of Windows Via C/C++)
- CLR Via C# 3rd 阅读摘要 -- Chapter 14 - Chars, Strings, and Working with Text
- Working with Characters and Strings(Chapter 3 of Windows Via C/C++)
- An Objective-C Primer(Chapter 2 of Objective-C Phrasebook)
- Numbers(Chapter 5 of Objective-C Phrasebook)
- 与android database 交互(chapter 14-Working with the SQLite Database)
- Chapter 7.Working with Bitmaps
- Chapter 03 Working with batches of data
- Working with collections in WCF RIA Services (part 1)
- Graph Databases—Chapter 4 Working with Graph Data阅读笔记
- [bbk5129]第13集 - Chapter 06- Working with Composite Data Types(Collection)