面试C++试题[12]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 x1001 的 blog

              *m_data = '\0';                     

       }                                           

       else

       {

              int length = strlen(str);          

              m_data = new char[length+1];  // 若能加 null 判断则更好     

              strcpy(m_data, str);               

       }

}    

// 拷贝构造函数

       string::string(const string &other)   // 3

       {    

        if(this==&other)

           return; //add by xie

本文关键:C++,林锐,面试试题
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top