标题:unexpected end of file found
取消只看楼主
一切皆安
Rank: 2
等 级:论坛游民
帖 子:70
专家分:46
注 册:2011-4-2
结帖率:91.67%
已结贴  问题点数:5 回复次数:1 
unexpected end of file found
#include<iostream>
using namespace std;
class father
{
private:
        int fatherheight,fatherweight;
public:
    void setfatherheight(int fatherheight){fatherheight=fatherheight;
    void setfatherweight(int fatherweight){fatherweight=fatherweight;
    void Showfatherheight()
    {
    cout<<"height="<<fatherheight<<"\t"<<"weight="<<fatherweight<<endl;
    }
};
class son: public
{
private:
    int sonwidth,sonlength;
public :
    void setwidth(int sonwidth){sonwidth=sonwidth;}
    void setlength(int sonlength){sonlength=sonlength;}
    void Showsondate(){cout<<"length="<<sonlength<<"\t"<<"width="<<sonwidth<<endl;
};
int main()
{
son a;                       
a.setfatherheight(160);
a.setfatherweight(60);
a.setsonwidth(60);
a.setsonlength(80);
a.Showfatherheightweight();
a.Showdatesondate();
return 0;
}
好像没错误吧,不知道错在哪,郁闷
搜索更多相关主题的帖子: private 
2011-06-04 12:02
一切皆安
Rank: 2
等 级:论坛游民
帖 子:70
专家分:46
注 册:2011-4-2
得分:0 
谢谢了
2011-06-04 15:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-341874-1-1.html




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

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