【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.3.17.2 TreeNode::AddNumericNode
Contents
Description
Creates a new node with the specified name, id and the double value and returns that node.
Creates a new node with the specified name, id and the integer value and returns that node.
Syntax
TreeNode AddNumericNode( double dVal, LPCSTR Name = NULL, int nChildID = -1 )
TreeNode AddNumericNode( int nVal, LPCSTR Name = NULL, int nChildID = -1 )
Parameters
- dVal
- [input] double contents of the node
- Name
- [input] the name of the new node to be added to the tree. The name string must be a valid C identifier name. A valid C Identifier name must begin with a letter and can contain only letters, numbers, and underscore characters.
- nChildID
- [input] the id of the new node to be added to the tree; NodeID will not be added if < 0
- nVal
- [input] integer contents of the node
- Name
- [input]the name of the new node to be added to the tree. The name string must be a valid C identifier name. A valid C Identifier name must begin with a letter and can contain only letters, numbers, and underscore characters.
- nChildID
- [input] the id of the new node to be added to the tree; NodeID will not be added if < 0
Return
The newly added node.
The newly added node.
Examples
EX1
void TreeNode_AddNumericNode_ex1() { Tree myTree; TreeNode tn1; tn1 = myTree.AddNumericNode(5.432, "node1", 1); out_tree(myTree); }
EX2
void TreeNode_AddNumericNode_ex2() { Tree myTree; TreeNode tn1; tn1 = myTree.AddNumericNode(5, "node1", 1); out_tree(myTree); }
Remark
See Also
TreeNode::AddNode, TreeNode::AddTextNode
Header to Include
origin.h