hello, I have this function:
template <class T> unsigned int HashTable<T>::hash( const string & key ) const
{
unsigned int hashVal = 0;
// cout << key << "%";
for( size_t i = 0; i < key.size(); i++ )
hashVal = ( hashVal << 5 ) ^ key[ i ] ^ hashVal;
return hashVal;
}
how to I convert it so it works with all data types?