数据结构家谱管理系统

发布时间 : 星期五 文章数据结构家谱管理系统更新完毕开始阅读

else { if(root->==NAme) { if(root->child==NULL) return flag; else { flag=1; cout<child-><<\ Node *p; Node *tree[20]; p=root->child; tree[0]=p; int top=0; while(p->brother!=NULL) { p=p->brother; top++; tree[top]=p; cout<<<\ } cout<<\是否查看孩子的详细信息(是:y,否:n):\ char ch; cin>>ch; if(toupper(ch)=='Y') { Node *q=tree[top]; while(top>-1) { PrintMessage(q); cout<<\ top--; q=tree[top]; } } } } } return flag; } void FamilyTree::SaveToFile(Node *root) //保存到文件 { if(root==NULL) { cout<<\家谱为空\ return ; } ofstream ofile; cout << \请输入要保存文件的路径:\ char c = (); //接收回车 char dir[40]; (dir, 40); (dir,ios::app); if (_access(dir, 0) == -1) //系统自带功能判断路径是否有效 { cout << \输入路径不存在!\ return; } else { //d:\\\ cout << \已经保存全部信息。\ ofile << \姓名\性别\配偶\出生地\生日\\学历\工作\父亲\健在\ Node *tree[20]; int top=0; while(root!=NULL||top!=0) { while(root!=NULL) { ofile<<<< setw(10)<<<<<<<<child; } if(top!=0) { root=tree[top]->brother; top--;

联系合同范文客服:xxxxx#qq.com(#替换为@)