I need to create a hash function that is supposed to return the sum of the ASCII values mod by 100(which is HASH_TABLE_SIZE) in a given char, but I don't seem to be getting the correct output. How do I correct this?
int string_set::hash_function(const char *s) { int h = 0; for (int i =0; i < *s; i++) { h = h + int(s[i]); return h % HASH_TABLE_SIZE; } return h; }
i < *ssupposed to mean?