-
Notifications
You must be signed in to change notification settings - Fork 0
/
Complex.h
29 lines (26 loc) · 938 Bytes
/
Complex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef POLINOMOOP_COMPLEX_H
#define POLINOMOOP_COMPLEX_H
#include <iostream>
#include <string>
using namespace std;
class Complex {
//partile reale si partile imaginare
int realPart;
int imaginaryPart;
public:
Complex();
Complex(int r, int i);
friend ostream & operator<<(ostream &basicOstream, const Complex &x);
friend istream & operator>>(istream &basicIstream, Complex &x);
friend Complex operator+(const Complex& a, const Complex& b);
friend Complex operator-(const Complex& a, const Complex& b);
friend Complex operator*(const Complex& a, const Complex& b);
friend bool operator==(const Complex& a, const Complex& b);
friend bool operator>(const Complex& a, int value);
friend bool operator<(const Complex& a, int value);
Complex& operator=(int value);
friend string to_string(const Complex &a);
private:
string validateInteger();
};
#endif //POLINOMOOP_COMPLEX_H