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

📄 intnode.cpp

📁 异质链表 的实现 实现异质链表的查找、插入、删除和遍历
💻 CPP
字号:
// IntNode.cpp: implementation of the CIntNode class.
//
//////////////////////////////////////////////////////////////////////

#include "IntNode.h"
#include "iostream.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CIntNode::CIntNode(int ivalue)
		: m_iValue(ivalue)
{

}

CIntNode::~CIntNode()
{

}

void* CIntNode::Visit()
{
	cout << m_iValue << endl;
	return &m_iValue;
}

bool CIntNode::operator==(const CNodeBase* base)
{
	CNodeBase* pBase = const_cast<CNodeBase*>(base);
	CIntNode* pNode = dynamic_cast<CIntNode*>(pBase);
	if(pNode==0)
		return false;
	if( pNode->m_iValue == this->m_iValue)
		return true;
	else
		return false;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -