///删除联系人函数部分开始-------------------------------------------------void deletecd char choic ifn0 /如果通讯录中没有一个记录输出以下部分/ printfquotntt 对不起,文件中无任何纪录quot printfquotntt 按任意键返回主菜单quot getch return systemquotclsquot /清屏/ printfquotntt----------------- 删除菜单 ----------------------quot printfquotntt 1-删除所有 2-删除单个 quot printfquotntt 3-返回主菜单 quot printfquotntt-------------------------------------------------quot printfquotntt 请选择您所所要的服务:quot choicgetch /输入的赋予 choice/ c switch hoic case 1:deleteallbreak case 2:deleteonebreak case 3:menubreak default:menubreak void deleteall//删除所有联系人 printfquotntt 确认删除y/nquot if getchy fclosefp if fpfopenquottxl.txtquotquotwquotNULL /文件空输出/ printfquotntt 不能打开文件,删除失败quot readfile n0 printfquotntt 纪录已删除,按任意键返回主菜单quot getch return else returnvoid deletename//按姓名删除联系人 int ijdeletemark0a0 char name20 printfquotntt 请输入要删除联系人nfquotsquotname /键盘输入姓名/ for iailtni if strcmptxli.namename 0 //对比字符串查找到要删除的联系人 printfquotntt 以下是您要删除的联系人纪录:quot printfquotntt--------------------------------quot printfquotntt li.name printfquotntt 电话: squottxli.phone printfquotntt 地址: squottxli.adress printfquotntt--------------------------------quot printfquotntt 是否删除y/nquot if getchy // 实现删除功能 for jijltn-1j txljtxlj1 /将通讯录的想前移/ n-- deletemark printfquotntt 删除成功quot printfquotntt 是否继续删除y/nquot if getchy deletename /继续调用删除函数/ return else return continue if deletemark0 printfquotntt 没有该联系人的纪录quot printfquotntt 是否继续删除y/nquot if getchy deletename return void deletephone//按电话号码删除联系人 int ijdeletemark0 /变量定义/ char phone20 printfquotntt 请输入要删除联系人电话号码:quot scanfquotsquotphone ifn0 printfquotntt 对不起,文件中无任何纪录quot printfquotntt 按任意键返回主菜单quot getch return for i0iltni if strcmptxli.phonephone0 printfquotntt 以下是您要删除的联系人纪录:quot printfquotntt li.name printfquotntt 电话: squottxli.phone printfquotntt 地址: squottxli.adress printfquotntt 是否删除y/nquot if getchy for jijltn-1j //递推替换实现删除 txljtxlj1 n-- deletemark //记录删除次数 printfquotntt 删除成功quot printfquotntt 是否继续删除y/nquot if getchy deletephone return else return continue if deletemark0 printfquotntt 没有该联系人的纪录quot printfquotntt 是否继续删除y/nquot if getchy return void deleteone//删除单个联系人 char choic printfquotnt----------------------------------------------------------quot printfquotntt 1-按姓名删除 2-按电话删除quot printfquotntt 请选择您所所要的服务:quot printfquotnt----------------------------------------------------------quot choicgetch switch choic case 1:deletenamebreak case 2:deletephonebreak ///删除函数部分结束--------------------------------------------------------///修改联系人函数开始--------------------------------------------------void modify /修改函数/ char choic ifn0 printfquotntt 对不起,文件中无任何纪录quot printfquotntt 按任意键返回主菜单quot getch return systemquotclsquot printfquotntt-----------------修改联系人菜单-----------------------quot printfquotntt 1-按姓名修改 2-按电话修改 quot printfqu