Get int value from a tree node, whether it is valid or not
int tree_node_get_int( TreeNode & tr, int nDefault = 0 )
Returns the integer value
EX1
void tree_node_get_int_ex1() { Tree tr; TreeNode trFirst = tr.AddNumericNode(1.0, "First", 1); int nVal = tree_node_get_int(trFirst, 0); printf("%d\n", nVal); //it is 1.0 nVal = tree_node_get_int(tr.InvalidNode, 0); printf("%d\n", nVal); //the result is 0 for default }
origin.h