⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stack.cpp

📁 蒙特卡罗方法可以有效地解决复杂的工程问题
💻 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 + -