必须有一些我对字典不了解的东西。我有以下代码:
NSArray *keys=[[NSArray alloc] initWithObjects:@"first person singular", @"second person singular", @"third person singular", @"first person plural", @"second person plural", @"third person singular", nil];
//This array logs a count of 6.
NSMutableArray *endingsPossible = [[NSMutableArray alloc] initWithObjects:@"iar", @"iēris", @"iētur", @"iēmur", @"iēminī", @"ientur", nil];
//This array logs a count of 6.
NSDictionary *setOfEndings = [[NSDictionary alloc] initWithObjects:endingsPossible forKeys:keys];
//This dictionary logs a count of 5.
其中一名成员如何迷路?
答案 0 :(得分:2)
“第三人称单数”键重复两次。
答案 1 :(得分:2)
您的密钥third person singular
有重复的条目。这就是为什么你只得到5个对象。我希望将其更改为third person plural
以获得预期的输出。