| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 896 人关注过本帖
标题:这个是什么错误啊?
只看楼主 加入收藏
小小
Rank: 1
等 级:新手上路
威 望:1
帖 子:219
专家分:0
注 册:2004-5-31
收藏
 问题点数:0 回复次数:3 
这个是什么错误啊?

#include "iostream.h"

class tool { public: tool() { weight=1000; height=9000; length=8000; width=7000; cout<<weight<<" "<<height<<" "<<length<<" "<<width<<endl;}

~tool() { cout<<"this is retool"<<endl;} protected: int weight; int height; int length; int width; }; class desk { public: desk() { weight=1000; height=9000; length=8000; width=7000; cout<<weight<<" "<<height<<" "<<length<<" "<<width<<endl;} ~desk() { cout<<"this is redesk"<<endl;} protected: int weight; int height; int length; int width; }; class pair {public: pair() {cout<<"this is pair"<<endl; ~pair() {cout<<"this is repair"<<endl; } protected: tool tool; desk desk; int nomeeting };

void main() { pair a; }

//错误信息::E:\C++\gouzao.cpp(58) : fatal error C1004: unexpected end of file found

搜索更多相关主题的帖子: weight length int desk 
2004-11-12 09:28
corrupt
Rank: 2
等 级:新手上路
威 望:3
帖 子:535
专家分:0
注 册:2004-9-29
收藏
得分:0 

大概意思就是 很多错,!!!

大错特错哦!

----------------

本人愚见,望大家海函!!


2004-11-12 09:54
小小
Rank: 1
等 级:新手上路
威 望:1
帖 子:219
专家分:0
注 册:2004-5-31
收藏
得分:0 
晕了~!

有一天咖啡的舞者 £
2004-11-12 11:00
小小
Rank: 1
等 级:新手上路
威 望:1
帖 子:219
专家分:0
注 册:2004-5-31
收藏
得分:0 

我自己发现了

原来不是 再最后少了一个"}"

而是在 类pair中的成员函数定义中少了"}"


有一天咖啡的舞者 £
2004-11-12 11:08
快速回复:这个是什么错误啊?
数据加载中...
 
   



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

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