📄 stackcopy.cpp
字号:
#include"stackcopy.h"
stackcopy::stackcopy()
{
countcopy=0;
}
bool stackcopy::empty()
{
bool outcome=true;
if(countcopy==0)
outcome=false;
return outcome;
}
bool stackcopy::full()
{
bool outcome=true;
if(countcopy<stack_max)
outcome=false;
return outcome;
}
int stackcopy::size()
{
return countcopy;
}
stack_entry stackcopy::top()
{
if(countcopy==0)
return 0;
return entry[countcopy-1];
}
Eorro_codecopy stackcopy::push(stack_entry&item)
{
Eorro_codecopy outcome=succese;
if(countcopy==stack_max)
outcome=overflow;
else
entry[countcopy++]=item;
return outcome;
}
Eorro_codecopy stackcopy::pop()
{
Eorro_codecopy outcome=succese;
if(countcopy==0)
outcome=underflow;
else
countcopy--;
return outcome;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -