求助 vc++

wolfkoala 2009-03-02 02:27:42
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
执行 cl.exe 时出错.

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

以上是错误信息

用的vc++6.0 帮忙看一下这个错误怎么解决
...全文
101 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
HoneyCat 2009-03-02
  • 打赏
  • 举报
回复
VC2005用起感觉比VC6舒服点
不过难装
VC2008的简化版 比较小还可以 就是没MFC之类的
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 wolfkoala 的回复:]
感谢 大家的帮助
那现在vc++ 最好的版本是那个?
[/Quote]
VC的这几个bug是一直在的,除非你不用.VC2005等那些应该不算单纯的编译器吧.
wolfkoala 2009-03-02
  • 打赏
  • 举报
回复
感谢 大家的帮助
那现在vc++ 最好的版本是那个?
  • 打赏
  • 举报
回复
服了,我这里没楼主那个错误.我试过VC6编译
报的是error C2248: 'mat' : cannot access private member declared in class 'matrix'
因为重载操作符你friend声明后,定义在类外,就报错,这是Vc6的bug来的,VS就没问题.
wendyncu 2009-03-02
  • 打赏
  • 举报
回复
cout < <mat[i][j] < <" ";
}
cout < <endl;
< <这两个<<之间没空格
wendyncu 2009-03-02
  • 打赏
  • 举报
回复
主函数一些小错误,先输入值再显示,而且b.set()后面应该是b.display()修改如下:
int main()
{
matrix a,b,f;
a.set();
a.display();

b.set();
b.display();
f=a+b;
f.display();

return 0;
}
wolfkoala 2009-03-02
  • 打赏
  • 举报
回复
up
wolfkoala 2009-03-02
  • 打赏
  • 举报
回复
#include<iostream>
using namespace std;
class matrix
{public:
matrix();
friend matrix operator+(matrix &,matrix &);
void display();
void set();
private:
int mat[2][3];
};
matrix::matrix()
{for(int i=0;i<2;i++)
{for(int j=0;j<3;j++)
{mat[i][j]=0;
}
}
}
void matrix::set()
{for(int i=0;i<2;i++)
{for(int j=0;j<3;j++)
{cin >>mat[i][j];
}
}
}
void matrix::display()
{for(int i=0;i<2;i++)
{for(int j=0;j<3;j++)
{cout <<mat[i][j]<<" ";
}
cout <<endl;
}
}
matrix operator+(matrix &c,matrix &d)
{matrix e;
for(int i=0;i<2;i++)
{for(int j=0;j<3;j++)
{e.mat[i][j]=c.mat[i][j]+d.mat[i][j];
}
}
return (e);
}
int main()
{
matrix a,b,f;
a.display();
a.set();
b.set();
a.display();
f=a+b;
f.display();
return 0;
}
以上即为代码 我实在找不出错误 帮忙看看
wendyncu 2009-03-02
  • 打赏
  • 举报
回复
不知道你的程序第1786行是什么,提示内部编译器出错。
AlwaysSLH 2009-03-02
  • 打赏
  • 举报
回复
帮顶

65,210

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧