P
Paul
Read the rest of the FAQ. For example, what if the object isMethod Man said:pointers allocated via new?" interesting to read. Here's the partial answer
from the FAQ:
I don't see the problem with copying objects bit-by-bit. It's ok for structs
isn't it? Can someone shed some light?
reference-counted? You don't update the reference count if you blindly copy
the object by using realloc(). Some implementations use reference counted
std::string's. If you bypass the copy-assign operators, you will
undoubtedly render the string object(s) unstable.
In general, that's why there is such a thing as a user-defined copy
constructor and assignment operator. They are there for a purpose, and that
purpose is to do something important if the object is copied or assigned.
-Paul