【发布时间】:2013-05-14 19:55:49
【问题描述】:
在 Master Algorithm with C 中,作者声明了一个链式哈希表的结构,如下所示:
typedef struct CHTbl_ {
int buckets;
int (*h)(const void *key);
int (*match)(const void *key1, const void *key2);
void (*destroy)(void *data);
int size;
List *table;
} CHTbl;
但我认为最后一个应该是List *table[buckets];
因为作者使用了&htbl->table[bucket] 之类的东西。我对吗?为什么作者的定义能正确通过测试?为什么是对的?谢谢!
【问题讨论】: