我正在尝试将数字存储在 NSMutableArray 中,并像这样包装它们:
-(IBAction)opUp:(id)sender{
opBool = YES;
opNum = [sender tag];
[numArray addObject:[NSNumber numberWithLong:number2]];
[opArray addObject:[NSNumber numberWithInt:opNum]];
number1 = 0;
number2 = 0;
opNum = 0;
NSLog(@"Operand %i", opNum);
NSLog(@"%i, %i", numArray.count, opArray.count);
}
但是当我稍后用这个给他们打电话时:
final2 = [numArray objectAtIndex:i];
operthing = [opArray objectAtIndex:i];
我收到此错误消息:
操作等于 111526320
'operthing' 不应该超过 20。有人可以帮我解决这个问题吗?谢谢。