Quote Originally Posted by BKurosawa View Post
The code you suggested gives the runtime error that the heap is corrupted.
I believe you're doing something wrong elsewhere and the problem is being manifested here.

For example, this is the main() I went with and had no visible problems:

Code:
int main()
{
	String s("Testing123");
	String s2("456Hello,there");
	
	std::cout << "s = \"" << s << "\"" << std::endl;
	std::cout << "s+=s2 = \"" << (s+=s2) << "\"" << std::endl;
	
	std::cin.ignore();
	
	return 0;
}