标题:又有问题啦!
只看楼主
朦朦胧胧
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2006-9-19
 问题点数:0 回复次数:0 
又有问题啦!


#include<iostream>
using namespace std;

class Integer
{
int i;
public:
Integer(int j){i=j;}
void print(ostream&out){out<<i;}
friend Integer operator+(Integer &in,int j)
{
// Integer *n=new Integer(in.i+j);
// return *n;
}

};

void main()
{}

编译,错误如下(把上边蓝色的部分去掉就没问题了):

--------------------Configuration: Z - Win32 Debug--------------------
Compiling...
main.cpp
F:\projects\Z\main.cpp(12) : 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.

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

知道的解释一下啊!谢谢。

2006-10-04 21:20



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




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

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