有关ios::base.h
student-main.cpp:#include "class-student.h"
class student_io
{
public:
inline bool f_input(student &t,fstream File);
bool f_output(fstream File);
//这两个function,就是一个平台,将student类中的被保护成员和写入数据可以共存
student *b; //数据的储存地
void display();
student_io( int n=1)
{
b=new student[n];
}
~student_io()
{
delete []b;
}
};
int main()
{
..........;
}
class-student.h:
class student_io;
class student
{
public:
bool input(long temp);
float average();
long sum();
void display();
friend student_io;
protected:
long number; //学生信息
char *name;
struct subject
{
float math;
float english;
float computer;
}data;
};
error:'std::ios_base::io_base(const std::ios_base &)' is private
error:initializing argument 2 of 'bool student_io::f_input(student& std::fstream)';
我怎么也编译不通过,总是跳出一个文件iOS::base.h,而且还弹出许多error;
请大家看看