不知道爲什麼我會在函數調用中丟失哨兵?在函數調用中缺少哨兵?
NSMutableArray *kkk = [NSMutableArray arrayWithObjects: @"a", @"b", @"cat", @"dog", nil];
ppp = [NSMutableArray arrayWithCapacity:3];
[ppp addObject:[[NSMutableArray alloc] initWithObjects: kkk]]; // <<--- Missing sentinel in function call
[ppp addObject:[[NSMutableArray alloc] initWithObjects: kkk, nil]]; //<<--- change, but it falls out
NSLog(@"Working: %@ %@", [[ppp objectAtIndex:0] objectAtIndex:3], [[ppp objectAtIndex:0] objectAtIndex:2]);
中的方法帶可變參數被稱爲** **可變參數的方法。參數被稱爲** varargs **。這些參數應以* nil *作爲最後一個參數終止。 – EmptyStack