From 626ab310955b5417675b0487a8d4f79f1786d355 Mon Sep 17 00:00:00 2001 From: Tajmeet Singh Date: Tue, 23 Jun 2020 14:53:09 +0100 Subject: [PATCH] fix: incorrect constructor delegation --- math/complex_numbers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/math/complex_numbers.cpp b/math/complex_numbers.cpp index 4505b5677..10e50b22a 100644 --- a/math/complex_numbers.cpp +++ b/math/complex_numbers.cpp @@ -36,7 +36,10 @@ class Complex { * Complex Constructor which initialises the complex number with no * arguments. */ - Complex() { Complex(0.0, 0.0); } + Complex() { + this->re = 0.0; + this.im = 0.0; + } /** * Member function (getter) to access the class' re value.