Revision 695ce68419d52b9e6762f9bd85cba4f91bd07915 authored by Brad King on 03 June 2014, 15:53:18 UTC, committed by Brad King on 03 June 2014, 15:53:18 UTC
2 parent s 687e0d6 + 44e2923
Raw File
objc++.mm
#import <Cocoa/Cocoa.h>
#import <iostream>
using namespace std;

int main()
{
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

  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;
}
back to top