?? cstack.cpp
字號:
#include "StdAfx.h"
#include "CStack.h"
bool CStack::IsEmpty()
{
if(top<=bottom)
return(true);
else
return(false);
}
void CStack::Clear()
{
top=0;
bottom=0;
memset(stack, 0, sizeof(stack));
}
void CStack::Push(CString str)
{
int i;
int length;
length=str.GetLength();
for(i=length-1;i>=0;i--)
stack[top++]=str[i];
}
void CStack::Pop(char &p)
{
p=stack[--top];
stack[top]=' ';
}
CString CStack::GetData()
{
int i=0;
CString str;
str.Empty();
while(stack[i]!=' ')
{
str+=stack[i];
i++;
}
return(str);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -