1
在主控算法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]
。我对吗?为什么作者的定义可以正确通过测试?为什么它是正确的?谢谢!