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

📄 student.cpp

📁 大二时做的课程设计
💻 CPP
字号:
// Student.cpp: implementation of the CStudent class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Student.h"
#include <string>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

string& CStudent::ID(){
	return _ID;
}
string& CStudent::SN(){
	return SequenceNumber;
}
string& CStudent::Name(){
	return name;
}


int& CStudent::operator[](int index){
	switch(index)
	{
	case 0:
		return math_score;
		break;
	case 1:
		return phys_score;
		break;
	case 2:
		return math1_score ;
		break;
	case 3:
		return comp_score;
		break;
	case 4:
		return engl_score ;
		break;
	default:
		throw "You must give the index no big than 4 and no less than 0!";
		break;
	}
}

⌨️ 快捷键说明

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