Advertisement

家谱树系统

阅读量:

FamilyTree.c

复制代码
    #ifndef FAMILYTREE_C
    #define FAMILYTREE_C
    #include "FamilyTree.h"
    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    
    void Init_Tree(struct BinNode *tree)
    {
    (tree) = NULL;
    }
    
    
    struct BinNode *Search_Tree(struct BinNode *T, char *name)
    {
    int i, j, count;
    struct BinNode *Q[100];
    
    i = j = 0;
    
    if(T)
    {
        Q[j++] = T;
        while(i<j)
        {
            while(Q[i]&& strcmp(Q[i]->data.Name, name)!=0)
            {
                if(Q[i] -> child)

全部评论 (0)

还没有任何评论哟~