What's wrong with unordered_map with custom hash function | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

What's wrong with unordered_map with custom hash function

I tried to have an unordered_map of custom class object as key. I am trying to use hash function from a new custom class, but not sure what is issue. Refer code below: https://code.sololearn.com/cupRKITB1gFb TrialUnorderedMap need some modification. I don't want to use custom equality as new class but new hasher I need as defined. Any thought?

2nd Apr 2022, 10:04 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
2 Antworten
+ 3
You are using a map instead of an unordered_map at the moment.
2nd Apr 2022, 10:27 AM
Shadow
Shadow - avatar
+ 1
Thanks... my bad
2nd Apr 2022, 11:51 AM
Ketan Lalcheta
Ketan Lalcheta - avatar