sortdepart.h
来自「学生运动会成绩数据库 学生运动会成绩数据库系统记录某校运动会上全部运动项目」· C头文件 代码 · 共 31 行
H
31 行
#ifndef _SortScore_h
#define _SortScore_h
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
class SortMark
{
public:
SortMark(string num="",float m=0):sort_dep_num(num),mark(m){}
friend bool operator ==(const SortMark &lf,const SortMark& rf)
{
bool flag=true;
if(rf.sort_dep_num!=lf.sort_dep_num)
flag=false;
return flag;
}
friend std::ostream& operator <<(std::ostream& os,const SortMark& sortsc)
{
os<<setw(10)<<sortsc.sort_dep_num<<setw(10)<<sortsc.mark<<endl;
return os;
}
void AddMark(float m)
{
mark+=m;
}
private:
string sort_dep_num;
float mark;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?