【发布时间】:2012-02-09 12:52:06
【问题描述】:
我设置了以下存储桶条目结构和哈希表
typedef struct Hash_Entry
{
struct Hash_Entry *next;
void *key_Data;
unsigned key_hash;
char key[5];
} Hash_Entry;
typedef struct Hash_Table
{
struct Hash_Entry **bucketPtr; /* Buckets in the table */
int size; /* Actual size of array. */
int numEntries; /* Number of entries in the table. */
int mask; /* Used to select bits for hashing. */
} Hash_Table;
我想为这个 Hash_Table 创建一个数组(或动态数组),这样当我觉得表已满时,我可以创建另一个表而不是调整它的大小
【问题讨论】:
标签: c arrays hashtable dynamic-arrays