我把int类型转化成NSString字符串了,然后进行了遍历,取出每个字符,‘1’,‘2’,‘3’,我想把这三个字符,加到NSMutableArray中,调用了[mtarray addObject: ]应该怎么写???????
int main(int argc, const char * argv[]) { @autoreleasepool {
NSLog(@"请输入一个5位数"); int num ; scanf("%d", &num); NSString *str = [NSString stringWithFormat:@"%d", num]; NSMutableArray *mtarray = [NSMutableArray array]; for (int i = 0; i < str.length; i++) { unichar c = [str characterAtIndex:i ];
[mtarray addObject:];
}
NSLog(@"%@", mtarray);
} return 0; }
|