From 9fafccf65f5a63c160c89aa507ab36fcd65bea7b Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Thu, 3 Aug 2023 14:18:05 +0200 Subject: [PATCH] init to 0 --- ex00/src/Fixed.cpp | 1 + ex01/src/Fixed.cpp | 1 + ex02/src/Fixed.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/ex00/src/Fixed.cpp b/ex00/src/Fixed.cpp index 86f923c..87bcb12 100644 --- a/ex00/src/Fixed.cpp +++ b/ex00/src/Fixed.cpp @@ -8,6 +8,7 @@ Fixed::~Fixed() Fixed::Fixed() { + this->_value = 0; std::cout << "Default constructor called" << std::endl; } diff --git a/ex01/src/Fixed.cpp b/ex01/src/Fixed.cpp index cae29ca..d9f27b5 100644 --- a/ex01/src/Fixed.cpp +++ b/ex01/src/Fixed.cpp @@ -10,6 +10,7 @@ Fixed::~Fixed() Fixed::Fixed() { + this->_value = 0; std::cout << "Default constructor called" << std::endl; } diff --git a/ex02/src/Fixed.cpp b/ex02/src/Fixed.cpp index cae29ca..d9f27b5 100644 --- a/ex02/src/Fixed.cpp +++ b/ex02/src/Fixed.cpp @@ -10,6 +10,7 @@ Fixed::~Fixed() Fixed::Fixed() { + this->_value = 0; std::cout << "Default constructor called" << std::endl; }