Item(char*name)//按照姓名查找商品?{?for(Supermarket*p=Head;p->Next!=End;p=p->Next)//匹配成功则返回上一个指针,不成功就返回空?if(!strcmp(p->Next->name,name))?returnp;?returnNULL;?} Supermarket*FindNum(char*Num)//按照编号查找?{ for(Supermarket*p=Head;p->Next!=End;p=p->Next)//匹配成功则返回上一个指针,不成功就返回空?if(!strcmp(p->Next->Num,Num)) returnp;?returnNULL;?} Supermarket*FindAdd(char*Add){ for(Supermarket*p=Head;p->Next!=End;p=p->Next)//匹配成功则返回上一个指针,不成就返回空if(!strcmp(p->Next->Add,Add))returnp; returnNULL;voidSupermarketmassage::Save(){out.open("sort.txt");for(Supermarket*p=Head->Next;p!=End;p=p->Next)?out<<"商品名称:"<<p->name<<"\t\t"<<"商品编号:"<<p->Num<<"\t\t"<<"进货总数:"<<p->Cnum<<"\t\t"<<"销售数目:"<<p->Mnum<<"\t\t"<<"剩余库存:"<<p->Enum<<"\t\t"<<"商品产地:"<<p->Add<<"\t\t"<<"商品单价:"<<p->Price<<"\t\t"<<"销售额:"<<p->Sum<<'\n';out.close();}八、运行结果1.运行界面增加4.显示查找