Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1.     String& operator= (const String& second) {
  2.         // free the old memory, and copy the new
  3.         delete[] array;
  4.         size = second.size;
  5.         array = new char[size];
  6.         for (int i = 0; i < size; i++) {
  7.             array[i] = second.array[i];
  8.         }
  9.         return (*this);
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement