📄 intnode.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 + -