string類的深拷貝和淺拷貝

1.string的淺拷貝 若是一個string只顯示的給出構造函數和析構函數,拷貝構造函數和賦值運算符重載使用系統默認的,當進行拷貝和賦值時,會出現什麼結果:javascript #include <string.h> class String { public: String(const char* str = ""); ~String(); private: char*
相關文章
相關標籤/搜索