下面是用代码实现:
private: char *data; size_t use_count; public: //构造函数 String_rep(const char *str = ""):use_count(0) { if(str == NULL) { data = new char[1]; data[0] = '