-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTComplex.h
41 lines (38 loc) · 1.42 KB
/
TComplex.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
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
class TComplex {
double Re;
double Im;
public:
void Input(double re, double im);
void Input(double re);
TComplex(double re, double im); //èíèöèàëèçèðóþùèé êîíñòðóêòîð
TComplex(double re); //êîíñòðóêòîð ïðåîáðàçîâàíèÿ òèïà
void Print(); //âûâîä íà ýêðàí
TComplex(); //êîíñòðóêòîð ïî óìîë÷àíèþ
~TComplex(); //äåñòðóêòîð
TComplex(const TComplex& Complex); //êîíñòðóêòîð êîïèðîâàíèÿ
TComplex operator+(const TComplex& Complex);
TComplex operator-(const TComplex& Complex);
TComplex operator*(const TComplex& Complex);
TComplex operator/(const TComplex& Complex);
TComplex& operator=(const TComplex& Complex);
bool operator==(const TComplex& Complex);
TComplex& operator+=(const TComplex& Complex);
TComplex& operator-=(const TComplex& Complex);
TComplex& operator*=(const TComplex& Complex);
TComplex& operator/=(const TComplex& Complex);
TComplex operator+(double number);
TComplex operator-(double number);
TComplex operator*(double number);
TComplex operator/(double number);
TComplex& operator=(double re);
bool operator==(double number);
TComplex& operator+=(double number);
TComplex& operator-=(double number);
TComplex& operator*=(double number);
TComplex& operator/=(double number);
};
TComplex operator+(double number, TComplex& Complex);
TComplex operator-(double number, TComplex& Complex);
TComplex operator*(double number, TComplex& Complex);
TComplex operator/(double number, TComplex& Complex);