2011年4月19日

类string的构造函数、拷贝构造函数和析构函数

摘要: 引用http://www.cppblog.com/life02/archive/2011/03/07/96085.html 在这个帖子的基础上稍微添加修改了点内容。String 类的原型如下class String{ public: String(const char *str=NULL);//构造函数 String(const String &other); //拷贝构造函数 ~String(void); //析构函数 String& operator=(const String &other); //等号操作符重载 ShowString(); private: ch 阅读全文

posted @ 2011-04-19 01:15 行走无疆 阅读(22033) 评论(3) 推荐(5) 编辑

导航