Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. if(this == &anotherArray)
  2. return *this;
  3. T* copy = new T[anotherArray.getCapacity()];
  4. for (int i = 0; i < getCapacity(); i++)
  5. copy[i] = anotherArray[i];
  6. delete[] _storage;
  7. _storage = copy;
  8. _capacity = anotherArray.getCapacity();
  9. return *this;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement