Home > other >  (=^_^=) bugs for tree, the recursive stack back an error said what tnode pointing to an empty
(=^_^=) bugs for tree, the recursive stack back an error said what tnode pointing to an empty

Time:05-03

The following is a tree node degree of function;
The number of the nodes to child namely LinkList_Length (node - & gt; Child) is the current tree node degrees,

Figure 1. This function is correct, the problem in figure 2

Figure 1:



The for loop iterates through all the nodes of the current node degrees, and the only difference is the condition in the for loop is I wrote i,
I used the vs debug found figure 2 to the degree of this function can also be right, but in finding the greatest degree of all nodes, return stack is problems
The error of figure 2, also said what node pointer to the tnode this should mean is empty,

I still think I figure 2 writing is correct, but can not find the answer to this bug, so to ask bosses opinion in BBS!!!!!!

Thank you

Figure 2:
  • Related