| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 440 人关注过本帖
标题: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
快速回复:unexpected end of file found
数据加载中...
 
   



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

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