For some odd reason, when I try to loop through my vector of strings
std::vector<Function> functionList;
std::vector<std::string> functionNames;
and try to store them in my hash_map
std::hash_map<Function, std::string> functions;
I come across 10 error messages all telling me that I have incorrectly used the binary operator '<'. I'm looping through like this:
for (auto i = 0; i < buffer.functionSize; i++)
{
functions[buffer.functionList[i]] = buffer.functionNames[i];
}
}
And the buffer object is another class in which the std::vectors are stored. The exact error messages are posted below. Any ideas?
Error 1 error C2784: 'bool std::operator <(const std::vector<_Ty,_Alloc> &,const`std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc>`&' from 'const Function'
EDIT: I changed the hash_maps to unordered_maps and I now get the error:
Error 1 error C2338: The C++ Standard doesn't provide a hash for this type.