data.StudentNum," 无"); strcpy(T->data.d" /> data.StudentNum," 无"); strcpy(T->data.d" />

全文预览

数据结构及其应用(算法与数据结构课程设计)

上传者:塑料瓶子 |  格式:doc  |  页数:15 |  大小:0KB

文档介绍
1810231802 free(q);} else if(DelNode->right) { q=DelNode->right; *DelNode=*q; q->left=NULL; q->right=NULL; free(q);} else { strcpy(T->data.name," 无"); strcpy(T->data.StudentNum," 无"); strcpy(T->data.date," 无"); strcpy(T->data.phone," 无");} } else { DelNodeFather=SearchFather(DelNode,T,&flag); if(DelNode->left) {p=DelNode->left; while (p->right) {p=p->right;} p->right=DelNode->right; q=DelNode->left; *DelNode=*q; q->left=NULL; q->right=NULL; free(q);} else{ q=DelNode->right; if(q) { *DelNode=*q; q->left=NULL; q->right=NULL; free(q);} else{ free(DelNode); if (flag==0) DelNodeFather->left=NULL; if (flag==1) DelNodeFather->right=NULL;} }} printf("\n 删除指定姓名后的同学录\n"); }} /**** 主函数****/ void main() { BiTree T; I nt caseflag; char ch[20]; DataType x={" 周五","1983-05-05","15855555555","0807011005"};

收藏

分享

举报
下载此文档