swh:1:snp:3cba5856b0ddc3feab6c3c2d096d614b02c883ec
Raw File
Tip revision: c1d5d5eb11e0260ffadda0851ac844ab46b6b179 authored by Brad King on 31 October 2019, 13:25:31 UTC
CMake 3.16.0-rc3
Tip revision: c1d5d5e
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