student.h

来自「基于链表模板的学生成绩管理系统」· C头文件 代码 · 共 35 行

H
35
字号
# ifndef STUDENT_CLASS
# define STUDENT_CLASS

# include <iostream>
# include <string>
# include <fstream>

using namespace std;

class Student
{
public:
	Student(int sn=0,string sna="",double ma=0.0,double ch=0.0);
	Student(const Student& s);
	bool operator==(Student& s);
	bool operator!=(Student& s);
	Student& operator=(const Student& s);
	friend ifstream& operator>>(ifstream& in,Student& s);
	friend ofstream& operator<<(ofstream& on,Student& s);
	friend ostream& operator<<(ostream& os,Student& s);
	int GetSno(){return sno;}
	string GetSname(){return sname;}
	double GetMath(){return math;}
	double GetChinese(){return chinese;}
	double GetAvg(){return avg;}
private:
	int sno;
	string sname;
	double math;
	double chinese;
	double avg;
};


# endif

⌨️ 快捷键说明

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