In Objective-C how should I best approximate what in Java I am doing like this:
static private String[] array {"A", "B", "C"};
What I think I need is a simple array that I can index into with some integers. Alternative suggestions are welcome, but bear in mind that if I am getting stuck on this then I am pretty much hopeless anyway.
As a test, I have tried using
NSArray *array = [[NSArray alloc] initWithObjects:@"A", @"B", @"C"];
in the main method but any more then one array of this type and I get Sig 11 or 10 errors. This happens even if I just have the arrays followed by NSLog statements. Just one array only.
Is it the case that this type of array is just unworkable in the main method? I really don't understand why it causes errors when I add a second array. They aren't even large.