Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ValueType* atMap (struct hashMap * ht, KeyType k)
- {
- int idx = stringHash2(k) % ht->tableSize;
- if (idx < 0){
- idx += ht->tableSize;
- }
- struct hashLink* current = ht->table[idx];
- while(current){
- if(strcmp(current->key, k)==0){
- ValueType* isVal = &(current->value);
- return isVal;
- }
- current=current->next;
- }
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement