阅读排行榜 1. C++/C | 关于char* char[] char = new char[n](2922) 2. C++语法综合 | 基于char*设计一个字符串类MyString(1229) 3. C++ | from_string函数的写法(968) 4. Bug记录 | C++对二进制文件录入、读取结构体数组遇到0xC0000005错误(859) 5. 由ping百度引发的思考(717) Copyright...
private:char * str;int len;};//MStr.cpp include "MStr.h"include MStr::MStr(void){ str = new char;str[0] = '\0';len = 0;} MStr::MStr(char *s){ int size = strlen(s);str = new char[size+1];str[size] = '\0';strcpy(str,s);len = size;} MStr::MStr(const...