Add default constructor
This commit is contained in:
parent
770263a8b8
commit
9dc0fc008c
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,10 @@ private:
|
|||
|
||||
public:
|
||||
// Constructor
|
||||
cnumber() {
|
||||
r = 0;
|
||||
i = 0;
|
||||
}
|
||||
cnumber(const cnumber &z) {
|
||||
r = z.r;
|
||||
i = z.i;
|
||||
|
@ -26,6 +30,7 @@ public:
|
|||
r = a;
|
||||
i = b;
|
||||
}
|
||||
~cnumber() {}
|
||||
// Member functions
|
||||
cnumber conjugate() const {
|
||||
fraction a(this->r.get_n(), this->r.get_d());
|
||||
|
|
Loading…
Add table
Reference in a new issue