im trying to remove an element from my array and was wondering if I could be ultra-efficeint using multiple indirection with my int ptrs.
The maxSize for my fixed-array lies within my hashTable->maxSize
I need to be able to refer to my hashTable's private member maxSize only as a reference. The varaible: &maxSize, holds nothing, it is NULL. What has my fixed-size is hashTable->maxSize;
bool hashmap::remove(char const * const symbol)
{
int **previous_index = &maxSize;
int *current_index = *previous_index;
while ( current_index &&
strcmp( symbol, hashTable[*current_index].m_symbol ) != 0 )
{
previous_index = ¤t_index + 1;
current_index = *previous_index;
}
return true;
}
I've been trying to get it to compile with a *maxSize int single ptr varaible. But i have a lot of code and its all affected. hehe.