摘要: String类的编写1,const & class 可以调用私有成员2. 友元函数重载 1 class MyString 2 { 3 public: 4 MyString(char * s = NULL) 5 { 6 if(s != NULL) 7 { 8 int size = strlen(s) + 1; 9 m_str = new char[size];10 strcpy(m_str, s);11 }12 else m_str = NULL... 阅读全文
posted @ 2012-11-12 17:25 可乐爱上了雪碧 阅读(248) 评论(0) 推荐(0) 编辑