First eliminate the extra "@".
Import Foundation:
#import <Foundation/Foundation.h>
Next:
items = null;
replaced the objects added to items
, is that what you want?
Also null
is not an Objective-C construct, rather it is an undeclared identifier. Perhaps it should be:
items = nil;
The following compiles error free:
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject:@"One"];
[items addObject:@"Two"];
[items addObject:@"Three"];
[items insertObject:@"Zero" atIndex:0];
items = nil;
}
}