查看: 5614|回复: 7
收起左侧

[已解决] 帮我看一下C++的程序,编程人员进

 关闭 [复制链接]
微点卫士
发表于 2008-7-2 12:08:52 | 显示全部楼层 |阅读模式


[ 本帖最后由 微点卫士 于 2008-7-4 09:40 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
微点卫士
 楼主| 发表于 2008-7-2 14:02:20 | 显示全部楼层
Compiling...
Cpp1.cpp
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(20) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1786)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

Cpp1.obj - 1 error(s), 0 warning(s)


这个致命的错误怎么办啊?
微点卫士
 楼主| 发表于 2008-7-2 14:08:25 | 显示全部楼层
Cpp1.cpp
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(4) : error C2871: 'std' : does not exist or is not a namespace
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(25) : error C2801: 'operator =' must be a <Unknown> member
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(75) : error C2065: 'other_number' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(75) : error C2228: left of '.number' must have class/struct/union type
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(99) : error C2181: illegal else without matching if
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(116) : error C2601: 'add' : local function definitions are illegal
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(138) : error C2556: 'class ostream &__cdecl operator <<(class ostream &,const class Gather &)' : overloaded function differs only by return type from 'class ostream __cdecl operator <<(class ostr
eam &,const class Gather &)'
        C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(26) : see declaration of '<<'
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(138) : error C2040: '<<' : 'class ostream &(class ostream &,const class Gather &)' differs in levels of indirection from 'class ostream (class ostream &,const class Gather &)'
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(138) : error C2601: '<<' : local function definitions are illegal
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(148) : error C2601: '+' : local function definitions are illegal
C:\Documents and Settings\Administrator\桌面\Cpp1.cpp(148) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.

[ 本帖最后由 微点卫士 于 2008-7-2 14:21 编辑 ]
伊の星
发表于 2008-7-2 18:58:11 | 显示全部楼层
C:\Documents and Settings\ETLY\桌面\未命名1.cpp:22: error: `void operator=(const Gather&)' must be a nonstatic member function

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:22: error: `void operator=(const Gather&)' must take exactly two arguments

C:\Documents and Settings\ETLY\桌面\未命名1.cpp: In copy constructor `Gather::Gather(const Gather&)':
C:\Documents and Settings\ETLY\桌面\未命名1.cpp:72: error: `other_number' undeclared (first use this function)

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:72: error: (Each undeclared identifier is reported only once for each function it appears in.)

C:\Documents and Settings\ETLY\桌面\未命名1.cpp: In member function `void Gather::list(int)':
C:\Documents and Settings\ETLY\桌面\未命名1.cpp:96: error: expected primary-expression before "else"

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:96: error: expected `;' before "else"

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:113: error: a function-definition is not allowed here before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:113: error: expected `,' or `;' before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:135: error: a function-definition is not allowed here before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:135: error: expected `,' or `;' before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:145: error: a function-definition is not allowed here before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:145: error: expected `,' or `;' before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:160: error: a function-definition is not allowed here before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:160: error: expected `,' or `;' before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:176: error: a function-definition is not allowed here before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:176: error: expected `,' or `;' before '{' token

C:\Documents and Settings\ETLY\桌面\未命名1.cpp:197: error: expected `}' at end of input
伊の星
发表于 2008-7-2 19:33:04 | 显示全部楼层
C语言编写的那个编译结果是
0 warning,0 error。
微点卫士
 楼主| 发表于 2008-7-2 20:19:44 | 显示全部楼层
C里面差了个交集的定义.其余应该OK
C++里面不对的,不用看了.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
伊の星
发表于 2008-7-2 20:35:23 | 显示全部楼层

回复 6楼 微点卫士 的帖子

原来你1楼C的不是使用32位头文件?!
而6楼附件的C是使用32头文件的?
-  -
真强悍,6楼的附件,vc编译通过。
pastport
发表于 2008-7-2 21:12:34 | 显示全部楼层
VC++ 2008 被我卸了
爱莫能助

就看了开头
既然用C++了
怎么不直接用STL呢
List 容器不好用么
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2026-10-21 14:46 , Processed in 0.111609 second(s), 3 queries , Redis On.

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表