|
From: Francesco <xtr...@vi...> - 2005-04-20 11:03:16
|
Hi everybody, I'm a total beginner and I have the following problem: I have an array of objects instantiated from a class that has member pointers to dynamically allocated data. This class has also the usual overloaded operator=. I have to sort this array and I need to do some swapping. But swapping by "deep copy" seems useless to me in this case, thus is it possible somehow to override the overloaded operator= and use just for the swapping the normal operator =? I could use memcpy for a bitwise copy, but it seems to be significantly slower, especially for small objects. Thanks in advance, Francesco |