Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- class Complex
- {
- double _im;
- double _re;
- public:
- Complex();
- Complex(double re, double im);
- double getIm() const;
- double getRe() const;
- void setIm(double im);
- void setRe(double re);
- // operators
- Complex & operator+=(const Complex & other);
- Complex operator+(const Complex & other)const ;
- double operator[](int number) const;
- bool operator!=(const Complex& other) const;
- bool operator==(const Complex& other) const;
- Complex & operator++(); //pre
- Complex operator++(int); //post
- void operator()(double re, double im);
- Complex & operator=(const Complex& other);
- };
- Complex & operator+ (Complex& complex, const double & d);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement