ex02: fix bozo bug

This commit is contained in:
Camille Chauvet 2023-10-04 15:27:42 +00:00
parent cc70b96d30
commit e5bcc44b2e

View File

@ -24,7 +24,7 @@ class Array
Array(const Array& src) Array(const Array& src)
{ {
new T[0]; this->_arr = new T[0];
*this = src; *this = src;
}; };
@ -42,6 +42,7 @@ class Array
new T[src._size]; new T[src._size];
for (size_t i = 0; i < src._size; i++) for (size_t i = 0; i < src._size; i++)
this->_arr[i] = src._arr[i]; this->_arr[i] = src._arr[i];
return *this;
}; };
T& operator[](unsigned int index) const T& operator[](unsigned int index) const