Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NSMutableset(add/remove,Etraction,Intersect)
//gcc 5.0.4 #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; //creating Mutable Set NSMutableSet *reparing= [NSMutableSet setWithObjects:@"Ferrari",@"Lamborghini",nil]; NSMutableSet *repaired= [NSMutableSet setWithObjects:@"BMW",@"AUDI",@"RR",nil]; NSMutableSet *resell= [NSMutableSet setWithObjects:@"RR",@"Tesla",@"BMW",nil]; NSMutableSet *sold= [NSMutableSet setWithObjects:@"Ford",@"Jaguar",nil]; NSMutableSet *result = [NSMutableSet setWithCapacity:10]; NSLog(@"Repairing:%@",reparing); NSLog(@"repaired:%@",repaired); //Etration for( NSString *Reparing in reparing ) { NSLog(@"%@",Reparing); } //Add/Remove Object [reparing removeObject:@"Ferrari"]; [repaired addObject:@"Ferrari"]; NSLog(@"Repairing:%@",reparing); NSLog(@"repaired:%@",repaired); //intersection [result setSet:resell]; [result intersectSet:reparing]; NSLog(@"result:%@",result); [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
NSSet Program in objectice-c
simple inheritance in objective c
basic arithmatic Opreation in objective C
emp class
bookinheritence
change case
add
NSMutableStringProgram
if con boleanos 01
string mutable