STYLE: Nightly Version update
[cmake.git] / Tests / ObjC++ / objc++.mm
blobb7ec4b5f59c95c35c1f4c6ca1d2fc7797f02c211
1 #import <iostream.h>
2 #import <Cocoa/Cocoa.h>
4 int main()
6   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
7    
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;
17   else
18     cout<<"It's not there."<<endl;
20   [pool release];
21   return 0;