0

辞書についてわからないことがあります。次のコードがあります。

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.

メンバーの 1 人がどのように迷子になっていますか?

4

2 に答える 2

2

「三人称単数」キーを 2 回繰り返します。

于 2012-10-19T13:07:09.043 に答える
2

キーのエントリが重複していますthird person singular。そのため、取得できるオブジェクトは 5 つだけです。third person plural私が推測する期待される出力のためにそれを変更してください。

于 2012-10-19T13:08:03.797 に答える