一、问题描述
【问题描述】基于char *设计一个字符串类MyString。具有构造函数、析构函数、拷贝构造函数、重载运算符“+”、“=”、“+=”、“[]”等 尽可能地完善,使之能满足各种需求 。
【输入形式】无
【输出形式】
【样例输入】无
【样例输出】
S1:initial test
S1:Hello World
tempTwo:; nice to be here!
S1:Hello World; nice to be here!
S1[4]: o
S1:Hellx World; nice to be here!
S1[999]:!
S3:Hellx World; nice to be here! Another myString
S4:Why does this work?
二、代码实现
#include <iostream>
#include <cstring>
using