Add default constructor

main
Micke Nordin 2 years ago
parent 770263a8b8
commit 9dc0fc008c
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -10,6 +10,10 @@ private:
public: public:
// Constructor // Constructor
cnumber() {
r = 0;
i = 0;
}
cnumber(const cnumber &z) { cnumber(const cnumber &z) {
r = z.r; r = z.r;
i = z.i; i = z.i;
@ -26,6 +30,7 @@ public:
r = a; r = a;
i = b; i = b;
} }
~cnumber() {}
// Member functions // Member functions
cnumber conjugate() const { cnumber conjugate() const {
fraction a(this->r.get_n(), this->r.get_d()); fraction a(this->r.get_n(), this->r.get_d());

Loading…
Cancel
Save