📄 people.h
字号:
// People.h: interface for the People class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PEOPLE_H__7A5CCC65_488A_4C96_8C59_A6F12051BE45__INCLUDED_)
#define AFX_PEOPLE_H__7A5CCC65_488A_4C96_8C59_A6F12051BE45__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <memory.h>
#include <string>
using std::string;
#include "birthday.h"
//#define SIZE 10 //输入name的长度
class People
{
public:
string name;
int id;//身份证号
int number;//编号
int sex;//性别 0 男 1 女
Birthday birthday;
public:
bool People::operator ==( People people);//"=="重载
People& People::operator =( People& people);//"="重载
People();
People(const People& p); //拷贝构造函数
virtual ~People();
void setPeople(string name,int id,int number,int sex,Birthday birthday); // 设置人员信息(1)
void setPeople(string name,int id,int number,int sex,int year,int month,int day); // 设置人员信息(2)
void displayPeople(string name,int id,int number,int sex,int year,int month,int day) const; // 显示人员信息
};
#endif // !defined(AFX_PEOPLE_H__7A5CCC65_488A_4C96_8C59_A6F12051BE45__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -