#ifndef STUDENT_STUDENT_H
#define STUDENT_STUDENT_H
#include <iostream>
#include "Student.h"
#include "Node.h"
using namespace std;
class Grade{
public:
int C_Lan;
int math;
int English;
};
struct Node{
Student data;
Node *next;
};
class Student{
private:
long Student_iD;
string StudentName;
Grade grade;
public:
bool addStudent(Node *&head);//包含录入,保存
bool eraseStudent(Node *&head);
bool modifyStudent(Node *&head);//只能改学号和名字
bool findStudent(Node *&head);
void display_TheBestOne();
void display_AverageGrade();
void display_MoreNinety();
void display_TheSunk();
void NewFile_Rank();
void testDisplay(Node *&head);
};
#endif //STUDENT_STUDENT_H
这是一个Student.h文件,这里有个很奇怪的问题,我把结点的结构体定义在Student类上面,则结点用不了Student类的方法;我把结点定义在Student类下面,则直接会报错,因为传参没有Node这个类型。这种情况怎么解决?