Add destructors to the C++ codes.

This commit is contained in:
Yudong Jin
2023-01-14 19:52:11 +08:00
parent 87acfc91ab
commit bb657f9517
19 changed files with 121 additions and 24 deletions

View File

@ -78,5 +78,8 @@ int main() {
bool empty = stack->empty();
cout << "栈是否为空 = " << empty << endl;
// 释放内存
delete stack;
return 0;
}