⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 people.cpp

📁 交通系统中关于各地之间可行线程的求得
💻 CPP
字号:
// People.cpp: implementation of the People class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "People.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

People::People()
{

}

// 拷贝构造函数
People::People(const People& p)
{
	name=p.name;
	id=p.id;
	number=p.number;
	sex=p.sex;
	birthday=p.birthday;
}

People::~People()
{

}
/*
*   重载"=="运算符
*	判断两个People类对象的id属性是否相等
*/
bool People::operator ==(People people)
{
	return this->id == people.id ;
}
/*
*   重载"="运算符
*	实现People类对象的赋值操作
*/
People& People::operator =( People& people)
{
	this->number = people.number;
	this->id  = people.id ;
	this->sex = people.sex ;
	this->name = people.name;
	//birthday   赋值
	this->birthday.year = people.birthday .year ;
	this->birthday .month = people.birthday .month ;
	this->birthday .day = people.birthday .day;
	return *this;
}

// 设置人员信息
void People::setPeople(string setname,int setid,int setnumber,int setsex,Birthday setbirthday)
{
	name=setname;
	id=setid;
	number=setnumber;
	sex=setsex;
	birthday=setbirthday;
}

void People::setPeople(string setname,int setid,int setnumber,int setsex,int setyear,int setmonth,int setday)
{
	name=setname;
	id=setid;
	number=setnumber;
	sex=setsex;
	birthday.setBirth(setyear, setmonth, setday);
}

// 显示人员信息
void People::displayPeople(string setname,int setid,int setnumber,int setsex,int setyear,int setmonth,int setday) const
{
	
}	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -