Пример #1
0
void Trie::print_words_recursive(TNode* root, char word[], int len) {
	TNode* child = root->get_first_child();

	while (child != NULL) {
		word[len] = child->get_node_value();
		// if this is a valid word, print it out
		if (child->end_of_word())
			print_array(word,len+1);
		print_words_recursive(child,word,len+1);
		child = child->get_next();
	}
}