Trying to understand some code?
Hello,
Given the following code:
table[city] = population;
How is it possible to get the value of population inside the overloaded function:
int& HashTable::operator[](string key);
When only the key [city] is passed in?
Edit:
Let me clarify a little bit:
The table is a class that we've been provided and we've been provided the header file of said class and must fill out the implementation file of this class. Since we can't edit the header file, I was wondering how this is possible?