2002-11-27 03:01:51 +03:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2012-07-18 18:03:59 +04:00
|
|
|
#import <iostream>
|
|
|
|
using namespace std;
|
2002-11-27 03:01:51 +03:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2002-11-27 03:01:51 +03:00
|
|
|
NSMutableSet *mySet = [NSMutableSet set];
|
|
|
|
cout<<"Adding values to the set."<<endl;
|
|
|
|
[mySet addObject:[NSNumber numberWithInt:356]];
|
|
|
|
[mySet addObject:[NSNumber numberWithInt:550]];
|
|
|
|
[mySet addObject:[NSNumber numberWithInt:914]];
|
|
|
|
|
|
|
|
cout<<"The set contains "<<[mySet count]<<" objects."<<endl;
|
|
|
|
if ([mySet containsObject:[NSNumber numberWithInt:911]])
|
|
|
|
cout<<"It's there!"<<endl;
|
|
|
|
else
|
|
|
|
cout<<"It's not there."<<endl;
|
|
|
|
|
|
|
|
[pool release];
|
|
|
|
return 0;
|
|
|
|
}
|