2017年2月6日

string类的构造和析构

摘要: class String { public: String(const char * str); String(const String & other); ~String(); String& operator=(const String & other); private: char * m_d 阅读全文

posted @ 2017-02-06 20:44 tomcao 阅读(549) 评论(0) 推荐(0) 编辑

C++二维指针

摘要: 二维指针的声明 int[5][10] int** p = (int**)new int*[5]; //定义5个指向int*的指针,每个指针是指向int*的指针 for(int i = 0; i < 5; ++i) { P[i] = new int[10]; } //对每个二维指针分配内存 二维指针的 阅读全文

posted @ 2017-02-06 20:18 tomcao 阅读(2613) 评论(0) 推荐(0) 编辑

导航