student.cpp

来自「文件包含了很多VC实例」· C++ 代码 · 共 53 行

CPP
53
字号
#include "stdafx.h"
#include "student.h"

CStudentInfo::CStudentInfo(CString str1,int s,CString str2,int c,int m,int e,CTime time)
{
	strName = str1;
	sex = s ;
	classGrade = str2;
	chinese = c ;
	math = m ;
	english = e ;
	regTime = time ;
}

int CStudentInfo::getTotal()
{
	return chinese + math + english ;
}

void CStudentInfo::setName(CString str)
{
	strName = str ;
}

void CStudentInfo::setSex(int s)
{
	sex = s;
}

void CStudentInfo::setClassGrade(CString str)
{
	classGrade = str ;
}

void CStudentInfo::setChinese(int c)
{
	chinese = c ;
}

void CStudentInfo::setMath(int m)
{
	math = m;
}

void CStudentInfo::setEnglish(int e)
{
	english = e ;
}

void CStudentInfo::setTime(CTime time)
{
	regTime = time ;
}

⌨️ 快捷键说明

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