📄 item.h
字号:
//Item.h
#ifndef ITEM_H
#define ITEM_H
#include <string>
//Item类
class Item {
std::string name; //姓名
std::string telNum; //电话号码
public:
//构造函数
Item();
Item(std::string newName, std::string newTelNum): name(newName), telNum(newTelNum){}
//GET函数
std::string getName() {
return name;
}
std::string getTelNum() {
return telNum;
}
//SET函数
void setName(std::string n) {
name = n;
}
void setTelNum(std::string t) {
telNum = t;
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -