Well like I said, you should
make the copy constructor perform a deep copy because of that, but it's not required. Remember that you don't produce two copies of the array if you don't, you only have one copy of the array, and actually yes you'd need to perform some extra work on the destructor to make sure that it when you delete the array that you NULL it out too or else the second delete command will cause a segmentation fault.
I'd go with the copy constructor route, like this:
x = new int;
for (int i = 0; i < 5; ++i) x[i] = other[i];
That'll take care of any segfaulting and will perform a deep copy which is what would be user expected.
If you enjoy reading this discussion and are thinking about commenting, why not click here
to register and start participating in under a minute?