I am just learning objective-C, and have a book with code like this:
NSArray *foods = [[[NSArray alloc] initWithObjects: @"cheese", @"ham", nil]];
This has an error – “Expected Identifier”. What does this mean, and what should this code look like?
(I’m using the newest xCode and iOS version, with the idea that by the time iOS5 is out, I’ll know it!)
I think that’s because you have extra brackets, it should be: