?? stack.cpp
字號:
// Stack.cpp: implementation of the Stack class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Stack.h"
#include <iostream.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Stack::Stack()
: tos(0)
{
}
Stack::~Stack()
{
}
void Stack::Push(char ch)
{
if ( tos == SIZE )
{
cout << "\nStack is full\n";
return;
}
stck[ tos++ ] = ch;
}
char Stack::Pop()
{
if ( tos == 0 )
{
cout << "\nStack is empty\n";
return 0;
}
tos--;
return stck[tos];
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -