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

📄 node.cpp

📁 一个关于二叉树的查询 插入 删除 排序的小程序
💻 CPP
字号:
// Node.cpp: implementation of the CNode class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "WHBtree.h"
#include "Node.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

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

Node::Node()
{
    Key=0;
	Leftchild=NULL;
	Rightchild=NULL;
	Parent=NULL;
}

Node::Node(int key)
{
	Key=key;
	Leftchild=NULL;
	Rightchild=NULL;
	Parent=NULL;
}

Node::~Node()
{

}

void Node::setLeft(Node * left)
{
	Leftchild=left;
}

void Node::setRight(Node* right)
{
	Rightchild=right;
}

void Node::setParent(Node* parent)
{
	Parent=parent;
}


Node* Node::getLeft()
{
	return Leftchild;
}

Node* Node::getRight()
{
	return Rightchild;
}

Node* Node::getParent()
{
	return Parent;
}


int Node::getkey()
{
	return Key;
}

⌨️ 快捷键说明

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