#ifndef COMPLEX_H #define COMPLEX_H /* Collaborating Class Declarations */ /* Base Class Headers */ /* C++ Headers */ #include using namespace std; /* ====================================================================== */ /* Class Complex Interface */ class Complex{ public: Complex(const double& re=0, const double& im=0) ; //Complex(double re=0, double im=0) ; double re() const; double im() const; double mod() const; double mod2() const; Complex coniugate() const; Complex inverse() const; private: double theReal, theImag; }; //somma Complex operator+(const Complex& lhs, const Complex& rhs) ; // prodotto Complex operator*(const Complex& lhs, const Complex& rhs) ; // opposto: potrebbe essere dentro la classe Complex operator-(const Complex& lhs); // differenza Complex operator-(const Complex& lhs, const Complex& rhs) ; // divisione Complex operator/(const Complex& lhs, const Complex& rhs) ; ostream& operator<<(ostream& out, const Complex& rhs) ; istream& operator>>(istream& pippo, Complex& o) ; #endif // COMPLEX_H