- #import <Foundation/Foundation.h>
- NSArray * kickOff10(NSArray *);
- int main(int argc, const char * argv[]) {
- NSArray *array = @[@1,@2,@10,@3,@10];
- NSArray *kicked = kickOff10(array);
- NSLog(@"%@,%@",array,kicked);
- return 0;
- }
- NSArray * kickOff10(NSArray *array)
- {
- NSMutableArray *temp = [NSMutableArray arrayWithArray:array];
- [temp removeObject:@10];
- return [NSArray arrayWithArray:temp];
- }
复制代码 |