struct trie_node {
char ch;
std::unordered_map<char, trie_node*> children;
trie_node() {
ch = '\0';
}
};
class Trie {
private:
trie_node* trie_root;
public:
Trie() {
trie_root = new trie_node();
}
void insert_recursive(std::string str, trie_node* root, int len, int init) {
if (len == 0) {
return;
}
std::unordered_map<char, trie_node*>::iterator it;
it = root->children.find(str[0]);
}
};
我正在尝试使用迭代器但是当我指定root->children.find(str[0]);
“没有合适的转换函数来自”std :: _ List_iterator&gt;&gt;&gt;“to”std :: _ List_iterator&gt;&gt;&gt; *“存在”
如何解决此问题?