この2つのエラーが発生しています。
error C2143: syntax error : missing ';' before '*'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
私はすでにインターネットからソリューションをチェックし#include <string>
ましstd::string
たstring
. 解決策を適用しましたが、問題はまだあります。これは私のコードです
friend std::ostream& operator<<(std::ostream& os, const Student& s);
friend class StudentList;
public:
Student(int id = 0,std::string name = "none");
virtual ~Student();
private:
std::string name;
int id;
Student* next;
RCourseList* rCList;
これは私のプログラムの上部です
#ifndef STUDENT_H
#define STUDENT_H
#include <iostream>
#include <string>
#include "RCourseList.h"
これはRCourseList.h
#ifndef COURSELIST_H
#define RCOURSELIST_H
#include "RCourse.h"
class RCourseList
{
public:
RCourseList();
private:
RCourse* rhead;
};
#endif // RCOURSELIST_H'