So to sum it all up, I'm a bit stuck. I'm making a bucket hash style HashTable class that is an array of pointers to single linked nodes. I'm a bit perplexed as to how I should retrieve the values of the nodes from the array.
When I try to retrieve values using an index I get that Value, Key, and Next are not members of HashTable. I am not sure how to structure the index operator. By declaring it as a HashTable type function, doesn't that also declare the return type? How should I go about just returning the Node, not a HashTable object?
Any insight would be greatly appreciated, I feel as though I may be overlooking some small details. Thanks!
That's what I had figured, but when I change the function type to Node& it will not work as an operator for HashTable. Is there any way around this?
EDIT:
I see, I forgot to pass the <DATA_TYPE> through when I declared the index operator, so seeing as there was no member strictly "Node" it wouldn't compile. Thanks!