Ex6.2 feedback: forgot to copy _default in Array copy ctor.
This commit is contained in:
parent
969ee37aa8
commit
5ac86eccb3
1 changed files with 1 additions and 0 deletions
|
@ -11,6 +11,7 @@ public:
|
||||||
|
|
||||||
Array(const Array& other) : _size(other._size) {
|
Array(const Array& other) : _size(other._size) {
|
||||||
_arr = new T[other._size] ;
|
_arr = new T[other._size] ;
|
||||||
|
_default = other._default;
|
||||||
|
|
||||||
// Copy elements
|
// Copy elements
|
||||||
for (int i=0 ; i<_size ; i++) {
|
for (int i=0 ; i<_size ; i++) {
|
||||||
|
|
Reference in a new issue