C++ fix: Add hashcode function for hashmap