Walk tree and copy all the values into given string vector
void tree_get_values( TreeNode & tr, vector<string> & vs, bool bSubNodeOnly = false )
EX1
void tree_get_values_ex1() { Tree tr; tr.Math.nVal = 1; tr.Math.Score.dVal = 90.5; tr.Math.Bookname.strVal = "Advanced Math"; tr.English.nVal = 2; tr.English.Score.dVal = 95.5; tr.English.Bookname.strVal = "English 1"; vector<string> vsOnlySubNode, vsAllNodes; tree_get_values(tr, vsOnlySubNode, true); tree_get_values(tr, vsAllNodes, false); }
tree_get_values_with_ids
origin.h