#include "treeNode.h" #include using std::cout; using std::endl; string TreeNode::getData() { return data; } vector TreeNode::getChildren() { return children; } void TreeNode::add(TreeNode *node) { children.push_back(node); } TreeNode* TreeNode::go(const string &data) { for(auto child : children) { if(child->getData() == data) { return child; } } return nullptr; } void TreeNode::print_node(int num) { for(int i=0; iprint_node(num+1); } }