📄 product.h
字号:
#include "property_mgr.h"
//class product_node;
class product{ //商品类
//friend class product_node;
public:
string name_product; //商品名称
property_mgr<string>* char_mgr; //描述型属性
property_mgr<int>* int_mgr; //数值型属性
product(); //构造函数
product(string n_product); //构造函数
product(string n_product,string n_property,string c_char_property); //构造函数
product(string n_product,string n_property,int c_int_property); //构造函数
};
product::product(){
name_product="新商品";
char_mgr=new property_mgr<string>();
int_mgr=new property_mgr<int>();
}
product::product(string n_product){
name_product=n_product;
char_mgr=new property_mgr<string>();
int_mgr=new property_mgr<int>();
}
product::product(string n_product,string n_property,string c_char_property){
name_product=n_product;
char_mgr=new property_mgr<string>(n_property,c_char_property);
int_mgr=new property_mgr<int>();
}
product::product(string n_product,string n_property,int c_int_property){
name_product=n_product;
char_mgr=new property_mgr<string>();
int_mgr=new property_mgr<int>(n_property,c_int_property);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -