c++????????/
#include <iostream>
using namespace std;
class faction
{
long den,fen;
public:
faction(long m,long n):den(m),fen(n){};
void standandize();
friend faction operator+(faction f1 ,faction f2);
friend faction operator-(faction f1 ,faction f2);
friend faction operator*(faction f1 ,faction f2);
faction operator/(faction f);
friend faction operator+=(faction f1 ,faction f2);
friend ostream& operator<<(ostream &os,faction f);
friend istream& operator>>(istream &is,faction &f);
faction operator-();
};
编译的时候出现了这样的信息这是为什么?
--------------------Configuration: faction - Win32 Debug--------------------
Compiling...
faction.cpp
d:\faction\faction.h(9) : 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 时出错.
faction.exe - 1 error(s), 0 warning(s)
参考答案:应该是这句faction operator-();出错,把它删除了