有谁知道如何输出一个结构变量,它在一个无序的映射中。我怎么能得到字典->例如单词
typedef struct dictionary{
std::string word;
unsigned char hash[20];
std::string hex;
} a_dictionary;
typedef std::unordered_map<std::string, dictionary*> Mymap;
std::unordered_map<std::string, dictionary* >::const_iterator got = c1.find(line);
if(out.is_open())
{
if ( got == c1.end() )
{
out << "????";
}
else
{
out << got->first << " , ";
}
}
}