C++ 大作业 超市收银系统 |
您所在的位置:网站首页 › 收银系统会员输入不了怎么办 › C++ 大作业 超市收银系统 |
#include #include #include #include #include #include using namespace std; string td; class Product //商品类 {private: //私有数据成员 double price; char name[30]; long number; public: //成员函数 double getprice() //获取商品价格 {return price;} char *getname() //获取商品名 {return name;} long getnumber() //获取商品条形码 {return number;} double setprice() //设置价格 { coutprice; } string setname() //设置商品名 { coutname; } void setnumber() //设置商品条形码 { coutnumber; } void addproduct(); //增加商品 void search(); //查找商品信息 void change(); // 更改商品信息 void display(); //显示商品信息 int del(int k=0); //删除商品信息 }; void Product::addproduct() //增加商品 { string pnumber,nam; int k=0; coutpnumber; nam="D:\\商品\\"+pnumber+".txt"; ifstream infile(nam.c_str()); if(infile) { cout |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |