电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

完整版家谱管理系统数据结构VIP免费

完整版家谱管理系统数据结构_第1页
1/9
完整版家谱管理系统数据结构_第2页
2/9
完整版家谱管理系统数据结构_第3页
3/9
#include #include #include #include #define MAXS 100 #define Elemtype char typedef struct BiTNode { int mark; int level; char name[50]; char birthday[50]; char address[MAXS]; Elemtype data; struct BiTNode *lc,*rc; }BiTNode,*BiTree; char nametemp[50];// 姓名char birthdaytemp[50];// 生日char addresstemp[MAXS];// 地址char ch; int leveltemp; int Nth; char searchdata[50]; char searchname[50]; int count; BiTree temp; BiTree CreateBiTree(FILE *fp); void PrintInfo(BiTree T); void PreOrderTS(BiTree T); void ShowNth(BiTree T); void SearchByName(BiTree T); void SearchByBirthday(BiTree T); void AddChild(BiTree T); void DeleteByName(BiTree T); void searchmenu(); void menu(); void insystem(); void closefile(); #include"my.h" void SearchByName(BiTree T)// 按照姓名查询,输出成员信息{ if(T) { if(T->lc) { if(T->lc->rc) { temp=T->lc->rc; while(temp) { if(strcmp(temp->name,searchname)==0) { count++; printf("\n 此人的信息为 : \n"); PrintInfo(temp); printf(" 此人父兄的信息为: \n"); PrintInfo(T); if(temp->lc->rc) { printf(" 此人孩子的信息为: \n"); temp=temp->lc->rc; while(temp) { PrintInfo(temp); temp=temp->rc; } } return; } else temp=temp->rc; } } } SearchByName(T->lc); SearchByName(T->rc); } else { printf(" 请先建立家庭关系\n"); return; } } void SearchByBirthday(BiTree T)// 按照出生日期查询成员名单{ if(T) { if(strcmp(T->birthday,searchdata)==0) { PrintInfo(T); count++; } } } void AddChild(BiTree T)// 某成员添加孩子{ if(T) { if(strcmp(T->name,searchname)==0) { count++; temp=(BiTree)malloc(sizeof(BiTNode)); printf(" 请输入添加孩子的姓名:\n"); scanf("%s",temp->name); printf(" 请输入添加孩子的出生年月:(格式形如 : 2010-1-1)\n"); scanf("%s",temp->birthday); printf(" 请输入添加孩子的家庭住址:\n"); scanf("%s",temp->address); temp->level=T->level+1; temp->rc=T->lc->rc; temp->lc=NULL; ...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

完整版家谱管理系统数据结构

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部