I have this code (a small part of the majority - only this nasty part shown here):
#define kSizeLarge @"large" -(void)determineBestFileSizeWithLimit:(int)limit { static NSString *largeName = kSizeLarge; static NSArray *nameArray = @[kSizeLarge]; ... }
The compiler loves the first static variable and hates the second, saying
Initializer element is not a compile-time constant
Removing statics from the second line makes the compiler happy.
What am I / doing wrong or wrong?
source share