Hash function for a string

后端 未结 5 2055
青春惊慌失措
青春惊慌失措 2020-12-01 06:40

We are currently dealing with hash function in my class. Our instructor asked us to a hash function on the internet to compare to the two we have used in our code.

T

5条回答
  •  执笔经年
    2020-12-01 07:09

    Use boost::hash

    #include 
    

    ...

    std::string a = "ABCDE";
    size_t b = boost::hash_value(a);
    

提交回复
热议问题