Actually, if the = is already overloaded he couldn't re overload it... he'd have to re-compile the string class with a new = operator.
What system, version of g++ and is it a call to the operator or the copy constructor?
operator=:
string A = "something";
string B;
B = A;
Copy constructor:
string A = "somehing";
string B = A;
You could always use a string stream, or the copy/copy_back STL functions (either from the class, or from the algorithum library [with iterators]), but I think you should just be able to find a fixed version of the string library for your system. Just some thoughts.
Of course you can't overload it again, but if it was already overloaded,I think the least it could do is make a deep copy (basic functionality), so I presumed it wasn't overloaded yet.
I think it uses the copy constructor...
Greetz,
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.