does anyone have a 'hash library' that they could share?
I need one of the functions to do this::
Creates a record for a hash table,
void *hash_table_create(int data_size, unsigned int (*hash)(void *key, int tablesize), bool (*compare_keys)(void *key1, void *key2));
initializes the hash table,
returns a pointer to the record as a void *.
data_size is used to calculate the size of the hash table ::: I need it to be able to tell the difference between separate chaining and quad. probing. if its separate chaining then it has to be the first prime number greater than "data_size". If its quad. probing then it needs to be one less then the first power of 2 greater than data_size.
Please please please help