student.cpp

来自「交通系统中关于各地之间可行线程的求得」· C++ 代码 · 共 41 行

CPP
41
字号
// Student.cpp: implementation of the Student class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Student.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Student::Student(){}
Student::Student(string name,int number,int sex,int id,Birthday birthday)
{
	//char *name  = new char[SIZE];
	this->name  = name;
	this->number = number;
	this->sex = sex;
	this->id = id;
	this->birthday.year = birthday.year ;
	this->birthday .month = birthday .month ;
	this->birthday .day = birthday .day;
}

Student::~Student()
{

}

void Student::SetClass(char classNO[SIZE])
{
	for(int i = 0;i<SIZE;i++){
		this->classNO [i]= classNO[i];
	}
}

void Student::operator =(Student student)
{
	People::operator= (student);
	this->SetClass (student.classNO );
}

⌨️ 快捷键说明

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