I have an array that contains 16 items
NSArray *centreFreqValues = @[@250, @750, @1250, @1750, @2250, @2750, @3250, @3750, @4250, @5250, @5750, @6250, @6750, @7250, @7750];
I have a loop that performs various tasks:
for (int i = 0; i < 16; i++) {
//do some other stuff
int centreFreq = centreFreqValues[i];
NSLog(@" here is each integer %d", centreFreq);
}
but I'm getting the error message:
Incompatible pointer to integer conversion initializing 'int' with an expression of type 'id'
NSNumberinstances, notint. So you can either use%@instead of%d. Or you can get theintValueas Sandy described.