Add copy constructor

This commit is contained in:
Micke Nordin 2022-07-16 09:37:03 +02:00
parent b9e3db439f
commit d291f7a330
Signed by: micke
GPG key ID: 014B273D614BE877

View file

@ -9,6 +9,10 @@ class cnumber {
public: public:
// Constructor // Constructor
cnumber(const cnumber &z) {
r = z.r;
i = z.i;
}
cnumber(const fraction &a, const fraction &b) { cnumber(const fraction &a, const fraction &b) {
r = a; r = a;
i = b; i = b;