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"};