📄 person.h
字号:
// Person.h: interface for the CPerson class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PERSON_H__D3F6F2CA_CDD8_4AA6_92A6_1A885FABE872__INCLUDED_)
#define AFX_PERSON_H__D3F6F2CA_CDD8_4AA6_92A6_1A885FABE872__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//人员信息类
class CPerson
{
private:
string name;//人员姓名
int age;//年龄
string sex;//性别
public:
string GetSex();//获得人员性别信息
int GetAge();//获得人员年龄信息
string GetName();//获得人员姓名信息
void SetSex(string s);//设置人员性别信息
void SetAge(int a);//设置人员年龄信息
void SetName(string n);//设置人员年龄信息
CPerson(string n="", int a=0, string s="")//人员信息类的构造函数
{
name = n;
age = a;
sex = s;
}
virtual ~CPerson();//人员信息类的析构函数
};
#endif // !defined(AFX_PERSON_H__D3F6F2CA_CDD8_4AA6_92A6_1A885FABE872__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -