Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef KOMPLEX_HPP_INCLUDED
- #define KOMPLEX_HPP_INCLUDED
- #include <iostream>
- using namespace std;
- class Complex
- {
- private:
- double real;
- double imag;
- public:
- Complex();
- Complex(double,double);
- Complex(const Complex&);
- double getReal() const;
- double getImag() const;
- void setReal(double);
- void setImag(double);
- Complex& operator=(const Complex&);
- Complex& operator+=(const Complex&);
- Complex& operator-=(const Complex&);
- Complex& operator*=(const Complex&);
- Complex& operator/=(const Complex&);
- Complex& operator++();
- Complex operator++(int);
- friend Complex operator+(const Complex&, const Complex&);
- friend Complex operator-(const Complex&, const Complex&);
- friend Complex operator*(const Complex&, const Complex&);
- friend Complex operator/(const Complex&, const Complex&);
- friend bool operator==(const Complex&, const Complex&);
- friend bool operator!=(const Complex&, const Complex&);
- friend ostream& operator<<(ostream&, const Complex&);
- friend istream& operator>>(istream&, Complex&);
- };
- #endif // KOMPLEX_HPP_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment