1
0
mirror of https://github.com/Didnelpsun/CS408.git synced 2026-06-16 06:56:54 +08:00

更新栈

This commit is contained in:
Didnelpsun
2021-09-16 16:48:37 +08:00
parent b1998ca91c
commit 74939da6df
46 changed files with 875 additions and 2438 deletions

View File

@@ -54,7 +54,7 @@ LinkStackNode *LinkStackNode::GetNext() {
}
LinkStackNode::LinkStackNode() {
this->SetData(NULL);
this->SetData(DEFAULTELEM);
this->SetNext(nullptr);
}
@@ -69,7 +69,7 @@ LinkStackNode::LinkStackNode(element_type data, LinkStackNode *next) {
}
bool LinkStackNode::Destroy() {
this->SetData(NULL);
this->SetData(DEFAULTELEM);
delete(this->GetNext());
this->SetNext(nullptr);
return true;