C++ 的淺拷貝和深拷貝

關於淺拷貝和深拷貝這個問題遇上的次數不多,這次遇上整理一下,先說這樣一個問題,關於淺拷貝的問題,先從最簡單的說起。 假設存在一個結構體: struct Student {     string name;     int age; }; ​這樣一個最簡單的問題 然後執行:     struct Student stu = {"liming", 18};     struct Student stu
相關文章
相關標籤/搜索