mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-16 14:14:27 +08:00
fix: incorrect constructor delegation
This commit is contained in:
@@ -36,7 +36,10 @@ class Complex {
|
|||||||
* Complex Constructor which initialises the complex number with no
|
* Complex Constructor which initialises the complex number with no
|
||||||
* arguments.
|
* 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.
|
* Member function (getter) to access the class' re value.
|
||||||
|
|||||||
Reference in New Issue
Block a user