Update 中括号重载.cpp

这里delete应该是delete[]
This commit is contained in:
pwjworks 2021-08-30 17:18:17 +08:00 committed by GitHub
parent 388564c9d9
commit 724b4f7d12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ public:
cout << employ[i].name << " " << employ[i].salary << endl; cout << employ[i].name << " " << employ[i].salary << endl;
} }
~SalaryManaege() { ~SalaryManaege() {
delete employ; delete[] employ;
} }
}; };
int main() int main()