changgyhub / leetcode_101

LeetCode 101:力扣刷题指南
8.69k stars 1.17k forks source link

error: use of class template 'hash' requires template arguments, page 94-95. #48

Closed chuck-tz closed 3 years ago

chuck-tz commented 3 years ago

When I compiled the code using -std=c++11, I got the following error: error: use of class template 'hash' requires template arguments return hash(obj, hash_table.size()); I'm thinking there would be an implicit type casting involved in the myhash's call to hash. Would that be the problem?

Btw, I really admire your work and it has helped me a ton!

changgyhub commented 3 years ago

I changed the code a bit and it should work now, PTAL.