Walk all tree nodes to delete specified attribute
int tree_remove_attribute( TreeNode & tr, LPCSTR lpcszAttribute )
total number of nodes the specified attribute is deleted
EX1
void tree_remove_attribute_ex1() { Tree tr; tr.First.DataID = 1; tr.Second.DataID = 2; tr.End.nVal = 0; int nCount = tree_remove_attribute(tr, STR_DATAID_ATTRIB); // return the count of treenodes removed attritute printf("%d\n", nCount); // nCount should be 2 here string strDataID; bool bRet = tr.Second.GetAttribute(STR_DATAID_ATTRIB, strDataID); //should return false here printf("bRet = %d, strDataID = %s\n", bRet, strDataID); }
origin.h