i have this variables (int and double-array)
.h-File
@interface MyCLass : NSObject
{
int myInt;
double paramStack[100];
}
@property (nonatomic, assign) int myInt;
//@property (nonatomic, assign) double paramStack; //<- ?
.m-File
@synthesise myInt;
//@synthesize paramStack; //<- ?
I want the int and the double-array-variable accessible from other classes via properties.
For the int-var. it looks fine, but the array throws errors at .m-file (@synthsize) and at h.file (@property (nonatomic, assign) double paramStack).
How can i define
“@property (nonatomic, assign) double paramStack;” as a double-array?
Thanks
Make the property with a pointer:
You can just use it like this:
This is mainly because an array cannot be returned, but a pointer can. I.E. this getter would be impossible and that’s why you cannot create an array property: