student.h
来自「数据结构课程设计中顺序表的实现用C++编写的」· C头文件 代码 · 共 35 行
H
35 行
////////////////////////////////////////////
//class name:student
//function:define the student class
///////////////////////////////////////////
#include <iostream.h>
#include <iomanip.h>
#include <fstream.h>
#include <string.h>
#include "seqlist.h"
class student
{
friend ostream& operator<<(ostream &,const student&);
friend istream& operator>>(istream &,student&);
private:
char name[12];//学生姓名
char ID[5]; //学生学号
int student_sex;//性别
char student_address[20];//籍贯
char student_birthday[13];//出生年月
int score;//成绩
int checkInfo();//数据合法性检查
public:
student();
int Input_data();//数据输入
void setName(char c_name[]);
void set_Address(char c_addree[]);
void set_score(int);
char* getName();
int getscore();
bool operator!=(student&) const;//判不等
bool operator==(student&) const;//判等
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?