From 724b4f7d12d4f947ace0437536bc0ea3b6a93b60 Mon Sep 17 00:00:00 2001 From: pwjworks <39911394+pwjworks@users.noreply.github.com> Date: Mon, 30 Aug 2021 17:18:17 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E4=B8=AD=E6=8B=AC=E5=8F=B7=E9=87=8D?= =?UTF-8?q?=E8=BD=BD.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里delete应该是delete[] --- practical_exercises/key_exercises/中括号重载.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/practical_exercises/key_exercises/中括号重载.cpp b/practical_exercises/key_exercises/中括号重载.cpp index a9a2137..23039bd 100644 --- a/practical_exercises/key_exercises/中括号重载.cpp +++ b/practical_exercises/key_exercises/中括号重载.cpp @@ -40,7 +40,7 @@ public: cout << employ[i].name << " " << employ[i].salary << endl; } ~SalaryManaege() { - delete employ; + delete[] employ; } }; int main()