在C++中定义复数operations #include <iostream> using namespace std; class complex{ public: complex(){ real = 0.0; imag = 0.0; } complex(double r_, double i_){ real = r_; imag = i_; }