diff --git a/practical_exercises/10_day_practice/day7/综合例题/重要.cpp b/practical_exercises/10_day_practice/day7/综合例题/重要.cpp index 83545ee..8cbcc46 100644 --- a/practical_exercises/10_day_practice/day7/综合例题/重要.cpp +++ b/practical_exercises/10_day_practice/day7/综合例题/重要.cpp @@ -21,7 +21,7 @@ public: const String &operator=(const String &R) { length = R.length; - strcpy(R.sPtr, sPtr); + strcpy(sPtr, R.sPtr); return *this; }; //重载赋值运算符 = const String &operator+=(const String &R); //字符串的连接 +=