-
hash_set and std::string
Friends, i am doing something like:
using namespace std;
hash_set<string> myhashstring;
myhashstring.insert("USA");
As such program is giving me error that:
(38): error C2440: 'type cast' : cannot convert from 'const std::string' to 'size_t'
But if i use "set" instead of "hash_set" the program works normally. Any one guess whats the problem ???
-
hash_set is not part of ISO standard C++. It's entirely possible that there's a bug in whatever standard library implementation you're using. We'll need a few more details to pin it down, though.
-
I am using the hash_set implementation that comes with VC++ 7.0 compiler.
-
Sorry, can't help, since I've not used VC++ 7.0