TreeNode
Default constructor
Copy Constructor
TreeNode( )
TreeNode( TreeNode & tn )
EX1
void TreeNode_TreeNode_ex1() { Tree tr; TreeNode tn1; //Default constructor tn1 = tr.AddTextNode("abc", "node2", 2); out_tree(tr); }
EX2
void TreeNode_TreeNode_ex2() { Tree tr1; TreeNode tn1; tn1 = tr1.AddTextNode("abc", "node1", 1); Tree tr2; TreeNode tn2(tn1); //Copy Constructor bool flag = tr2.AddNode(tn2, FALSE); // If the bDeep is FALSE, only add the node tn2 itself. out_tree(tr1); out_tree(tr2); }
Copy constructor.
origin.h