I'm having troubles creating a property of an array of integers in Objective C. I'm not sure whether this is even possible to do in Obj-C so I'm hoping someone can help me in finding out either how to do it correctly or provide an alternative solution.
myclass.h
@interface myClass : NSObject {
@private int doubleDigits[10];
}
@property int doubleDigits;
@end
myclass.m
@implementation myClass
@synthesize doubleDigits;
-(id) init {
self = [super init];
int doubleDigits[10] = {1,2,3,4,5,6,7,8,9,10};
return self;
}
@end
When I build and run, I get the following error:
error: type of property 'doubleDigits' does not match type of ivar 'doubleDigits'
Hopefully someone can either provide a solution or steer me in the correct direction.
Thanks in advance.