【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.26.28 tree_count_items
Contents
Description
Count number of leaves in the given tree
Syntax
int tree_count_items( TreeNode & tr, int * lpnSections = NULL )
Parameters
- tr
- [Input] TreeNode to count
- lpnSections
- [Input] if given, then count the number of branches that contain these leaves
Return
total number of leaves
Examples
EX1
void tree_count_items_ex1() { Tree tr; tr.Math.Grade.dVal = 90.5; tr.English.Grade.dVal = 95.5; tr.Math.Bookname.strVal = "Advanced Math"; tr.English.Bookname.strVal = "English 1"; int nCount = tree_count_items(tr.Math); int nSections; nCount = tree_count_items(tr, &nSections); }
Remark
See Also
Header to Include
origin.h