HashTables in Cocoa

后端 未结 5 1661
日久生厌
日久生厌 2020-12-24 12:16

HashTables/HashMaps are one of the most (if not the most) useful of data-structures in existence. As such, one of the first things I investigated when starting to

5条回答
  •  太阳男子
    2020-12-24 12:49

    NSDictionary and NSMutableDictionary?

    And here's a simple example:

    NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init];
    [dictionary setObject:anObj forKey:@"foo"];
    [dictionary objectForKey:@"foo"];
    [dictionary removeObjectForKey:@"foo"];
    [dictionary release];
    

提交回复
热议问题