云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数据结构家谱管理系统

数据结构家谱管理系统

  • 62 次阅读
  • 3 次下载
  • 2026/1/10 11:57:36

{ if(root!=NULL) numberofpeople++; NumberOfPeople(root->child); NumberOfPeople(root->brother); } return numberofpeople;*/ else return Numberofpeople; } //int count=0; int FamilyTree::LifeNum( ) //健在人数 { if(root==NULL) //-1表示这个家族不存在 return -1; /*else { if(toupper(root->=='Y') count++; LifeNum(root->child); LifeNum(root->brother); } return count;*/ return LifePeopele; } void FamilyTree::PrintMessage(Node *root ) //输出基本信息 { if(root==NULL) return ; else { cout<<\姓名:\ cout<<\性别:\ cout<<\配偶:\ cout<<\出生地:\ cout<<\生日:\ cout<<\父亲:\ cout<<\学历:\ cout<<\工作:\ cout<<\是否健在:\ if(toupper(root->=='Y') cout<<\是\ else cout<<\否\ } } int message=0; //判断是否查找成功 int FamilyTree::Message(Node *root,string Name) //显示该成员的基本信息 { if(root==NULL) return message; else { if(root->==Name) { message=1; PrintMessage(root ); } else { Message(root->child,Name); Message(root->brother,Name); } } return message; } Node* FamilyTree::PreFindFather(Node *root,string FatherName) //给定元素值查找父亲结点指针位置并返回其指针,此方法采用的先序遍历 { if(root==NULL) throw\错误\ Node *p; Node *tree[20]; int top=0; while(root!=NULL||top!=0) { while(root!=NULL) { if(root->==FatherName) p=root; top++;

搜索更多关于: 数据结构家谱管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

{ if(root!=NULL) numberofpeople++; NumberOfPeople(root->child); NumberOfPeople(root->brother); } return numberofpeople;*/ else return Numberofpeople; } //int count=0; int FamilyTree::LifeNum( ) //健在人数 { if(root==NULL) //-1表示这个家族不存在 return -1; /*else { if(toupper(root->=='Y') count++; LifeNum(root->child); LifeNum(root->brother); } return count;*/ return LifeP

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com