1 Replies - 1186 Views - Last Post: 20 November 2011 - 08:59 AM Rate Topic: -----

#1 angeltinka   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-October 10

Overloading Hash Function

Posted 20 November 2011 - 08:12 AM

I am inserting all of the words in the dictionary into the unordered_set STL.

For the life of me, I cannot figure out how to override the default hash function for the unordered_set.

Can someone please point me in the right direction? I cannot figure out the syntax.

Thank you in advanced
Is This A Good Question/Topic? 0
  • +

Replies To: Overloading Hash Function

#2 vividexstance   User is offline

  • Tiocfaidh ár lá
  • member icon

Reputation: 794
  • View blog
  • Posts: 2,880
  • Joined: 31-December 10

Re: Overloading Hash Function

Posted 20 November 2011 - 08:59 AM

The hash function is passed as the second template parameter to the unordered_set. Google is your friend, I typed what you were looking for and found this: hashing and equality

This post has been edited by vividexstance: 20 November 2011 - 09:00 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1