如出现近似问题
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
把 #include<iostream>
using namespace std;
改为 #include<iostream.h>
因为VC++6.0没有完全实现C++标准库
//#include<iostream>
//using namespace std;
#include<iostream.h>
class Complex{
public:
Complex(double r=0.0,double i=0.0)
{
real=r;
imag=i;
}
friend Complex operator+(Complex &a,Complex &b); //声明友元函数的重载“+”
friend Complex operator-(Complex &a,Complex &b);
friend Complex operator*(Complex &a,Complex &b);
friend Complex operator/(Complex &a,Complex &b);
void display();
protected:
double real;//复数实部
double