node.cpp

来自「最短路径算法」· C++ 代码 · 共 31 行

CPP
31
字号
// Node.cpp: implementation of the CNode class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Node.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CNode::CNode()
{
	m_cost = 1;
}

CNode::~CNode()
{
}

CNode CNode::Copy()
{
	CNode ret;
	ret.m_cost = m_cost;
	ret.m_NodeNr = m_NodeNr;
	ret.m_p.x = m_p.x;
	ret.m_p.y = m_p.y;
	
	return ret;
}

⌨️ 快捷键说明

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