mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 03:29:46 +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
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user