📄 student.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 + -