heres a great hash generating algo for those who might be interested
Code:
getHash(int& hash, const char* key)
{
unsigned long h = 0;
unsigned long g;
unsigned char ch;
while (*key != 0) {
ch = (unsigned char) *key++;
h = (h << 4) + ch;
if ((g = h & 0xf0000000L) != 0)
h = (h ^ (g >> 24)) ^ g;
}
hash = (int)h%CAPACITY; //CAPACITY is the size of your hash table
}
i stored a full english dictionary using this hash generating funtion and collision time was neglegable. =)
(btw: the algorithm is credited to some crazy math guy but i cant remember his name)