又有问题啦!
#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)
知道的解释一下啊!谢谢。