There is a great example of a simple hash table in C++
for a single key, but I would like to hash on a <int, double>
combination so that, for example h[5, 0.1]
will return a double
. Is this possible?
One possible method to get around this is to create an array of unordered_map
s, and then have the key
be a double. So, for example, I could simply call h[5][0.1]
and get the double
value back. In this the best way to go about this or can I create a multi-variabled key?