Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String& operator= (const String& second) {
- // free the old memory, and copy the new
- delete[] array;
- size = second.size;
- array = new char[size];
- for (int i = 0; i < size; i++) {
- array[i] = second.array[i];
- }
- return (*this);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement