📄 stack.cpp
字号:
// Stack.cpp: implementation of the CStack class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "RayTrace.h"
#include "Stack.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CStack::CStack()
{
}
CStack::~CStack()
{
}
//压结点指针pNode入栈
void CStack::Push(CListNode *pNode)
{
ASSERT( pNode != NULL );
AppendNode( pNode );
}
//返回出栈结点指针
CListNode* CStack::Pop()
{
CListNode* pTail = GetTail();
DeleteNode( pTail );
return pTail;
}
//栈判空,空返回TRUE,非空返回FALSE
BOOL CStack::IsEmpty()
{
if( 0 == nNodeNum )
return TRUE;
else
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -