mirror of
https://github.com/tiennm99/HCMUT.git
synced 2026-10-14 10:18:38 +00:00
chore: migrate
This commit is contained in:
1 parent
5b3a8665e6
commit
a34848ef78
16 files changed
+868
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#include "Stack.h"
|
||||
|
||||
Stack::Stack()
|
||||
{
|
||||
stack = new List;
|
||||
}
|
||||
|
||||
void Stack::push(int newdata)
|
||||
{
|
||||
stack->addFirst(newdata);
|
||||
}
|
||||
|
||||
int Stack::pop()
|
||||
{
|
||||
int ret = stack->returnFirst();
|
||||
stack->removeFirst();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Stack::~Stack()
|
||||
{
|
||||
delete stack;
|
||||
}
|
||||
Reference in new issue
Block a user