2 #import <Cocoa/Cocoa.h>
6 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
8 NSMutableSet *mySet = [NSMutableSet set];
9 cout<<"Adding values to the set."<<endl;
10 [mySet addObject:[NSNumber numberWithInt:356]];
11 [mySet addObject:[NSNumber numberWithInt:550]];
12 [mySet addObject:[NSNumber numberWithInt:914]];
14 cout<<"The set contains "<<[mySet count]<<" objects."<<endl;
15 if ([mySet containsObject:[NSNumber numberWithInt:911]])
16 cout<<"It's there!"<<endl;
18 cout<<"It's not there."<<endl;