关于超市商品管理系统C

上传人:夏** 文档编号:499422380 上传时间:2022-08-30 格式:DOCX 页数:16 大小:32.15KB
返回 下载 相关 举报
关于超市商品管理系统C_第1页
第1页 / 共16页
关于超市商品管理系统C_第2页
第2页 / 共16页
关于超市商品管理系统C_第3页
第3页 / 共16页
关于超市商品管理系统C_第4页
第4页 / 共16页
关于超市商品管理系统C_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《关于超市商品管理系统C》由会员分享,可在线阅读,更多相关《关于超市商品管理系统C(16页珍藏版)》请在金锄头文库上搜索。

1、关于超市市商品管管理系统统C+程序基本功能能:基本本功能(供供参考)有有:1、添加加商品信信息,有有商品编编号、商商品名、供供应商代代号、进进货价、售售出价、存存货数等等。2、2、进货货:若商商品已存存在,只只需修改改存货数数;若不不存在,需需增加新新纪录。3、售出出:输入入商品编编号,修修改相应应的存货货数与销销售额。4、查询询:查询询商品、销销售额# inncluude # inncluude # inncluude #inccludde /用gettch();usinng nnameespaace stdd;/ccommmodiity类类classs ccommmodiitypublli

2、c: chaar nnamee200; chaar IId220; intt buuy;/进货货价; intt saale;/卖卖出价; intt ammounnt;/数量量; intt suum;/利润润; commmoddityy * Nexxt; voiid IInpuut() cooutnamme; cooutIId; cooutbuyy; cooutsalle; cooutammounnt; suum=(salle-bbuy)*ammounnt; voiid RReaddFille(iistrreamm & in) innnnameeIIdsallebuyyssum; voiid S

3、Showw() coout商商品名nnameeeendll编号:IIdenddl进货货价buuy售出出价saale商商品数量量: ammounnt预计计总利润润:suumenddlenddlNeext;p!=Endd;p=p-Nexxt) pp-SShoww(); cooutInpput(); Ennd-Nexxt=nnew commmoddityy; Ennd=EEnd-Neext; coout添添加成功功!enndl; cooutNexxt!=Endd;p=p-Nexxt)/匹配配成功则则返回上上一个指指针,不不成功就就返回空空 iif(!strrcmpp(p-Neext-naame,na

4、mme)retturnn p; rretuurn NULLL; commmoddityy *FFinddID(chaar * Idd) foor(ccommmodiity * pp=Heead;p-Nexxt!=Endd;p=p-Nexxt)/匹配配成功则则返回上上一个指指针,不不成功就就返回空空 iif(!strrcmpp(p-Neext-Idd,Idd)rretuurn p; rretuurn NULLL;/构造造函数Commmodiitymmasssagee:CCommmodiitymmasssagee() Heaad=nnew commmoddityy; Heaad-Nexxt=nne

5、w commmoddityy; Endd=Heead-Neext; in.opeen(sorrt.ttxt); if(!inn) coout无无商品信信息。请请先输入入。ReeadFFilee(inn); iff(Ennd-namme00=00)bbreaak; EEnd-Neext=neww coommooditty; EEnd=Endd-NNextt; inn.cllosee(); cooutttt读取商商品信息息成功!Nexxt!=Endd;) temmp=HHeadd-NNextt; Heead-Neext=Heaad-Nexxt-Nexxt; deelette ttempp; del

6、letee Heead,Endd;/菜单单voidd Coommoodittymaassaage:ShhowMMenuu() coout超市商品管理系统enndl; cooutenddl; coout 1.增加超超市商品品enddl; coout 2.显示超超市商品品enddl; coout 3.排序统统计商品品enddl; coout 4.查找超超市商品品enddl; coout 5.删除超超市商品品enddl; coout 6.修改超超市商品品enddl; coout 0.安全退退出系统统enddl; couutnnttnntt请选选择:;/查找找函数voidd Coommoodittym

7、aassaage:Fiind() chaar nnamee200 ,Id10; intt x; commmoddityy * p=NNULLL; couutnntt*nn; couutttt 1.按商品品的名称称查找nttt 2.按商品品编号查查找; couutxx; swiitchh(x) casse 11:ccouttnamme; iff(p=FinndIttem(namme) pp-NNextt-SShoww(); ccoutt输入任任意字符符!继续续; ggetcch(); ellse ccoutttt没有有找到该该名称的的商品!nnenddl; ccoutt输入任任意字符符!继续续; ggetcch(); bbreaak; casse 22: ccouttId; iif(pp=FiindIID(IId) p-Nexxt-Shoow(); couut输入入任意字字符!继继续; gettch(); eelsee couutttt没没有找到到该编号号的商品品!nenndl; couut输入入任意字字符!继继续; gettc

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 市场营销

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号