ex02: fix bozo bug
This commit is contained in:
parent
cc70b96d30
commit
e5bcc44b2e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user