2008-2-19

来源:互联网 发布:考试酷软件下载 编辑:程序博客网 时间:2024/05/21 10:56

逆序对 时空复杂度(nlogn) 归并排序

试题7:编写类String的构造函数、析构函数和赋值函数,已知类String的原型为:

class String
{
 public:
  String(const char *str = NULL); // 普通构造函数
  String(const String &other); // 拷贝构造函数
  ~ String(void); // 析构函数
  String & operate =(const String &other); // 赋值函数
 private:
  char *m_data; // 用于保存字符串
};

 

原创粉丝点击