| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4852 人关注过本帖
标题:有关ios::base.h
只看楼主 加入收藏
九天冥盟
Rank: 2
等 级:论坛游民
威 望:1
帖 子:77
专家分:20
注 册:2015-7-14
结帖率:36%
收藏
 问题点数:0 回复次数:2 
有关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;
请大家看看
搜索更多相关主题的帖子: function display include public 
2016-06-10 15:36
九天冥盟
Rank: 2
等 级:论坛游民
威 望:1
帖 子:77
专家分:20
注 册:2015-7-14
收藏
得分:0 
555555
2016-06-26 00:30
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:528
帖 子:9007
专家分:53942
注 册:2011-1-18
收藏
得分:0 
传引用

其它就不评价了
2016-06-26 01:29
快速回复:有关ios::base.h
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019847 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved