Instead of copying the pointer, do a deep copy of the string, either manually with a loop until the null character, or using strcpy() from <cstring>.That was the constructor I was unsure about. How do I fix it?
Instead of copying the pointer, do a deep copy of the string, either manually with a loop until the null character, or using strcpy() from <cstring>.That was the constructor I was unsure about. How do I fix it?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)