📄 lxbinnode.cpp
字号:
// lxbinnode.cpp: implementation of the lxbinnode class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "lxbinnode.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
lxbinnode::lxbinnode()
{
lc=rc=NULL;
}
lxbinnode::~lxbinnode()
{
}
lxbinnode::lxbinnode(int e, lxbinnode *l, lxbinnode *r)
{
it=e;
lc=l;
rc = r;
}
int& lxbinnode::val()
{
return it;
}
void lxbinnode::setval(const int &e)
{
it=e;
}
lxbinnode* lxbinnode::left() const
{
return lc;
}
void lxbinnode::setleft(lxbinnode *b)
{
lc=b;
}
lxbinnode* lxbinnode::right() const
{
return rc;
}
void lxbinnode::setright(lxbinnode *b)
{
rc=b;
}
bool lxbinnode::isleaf()
{
return (lc==NULL)&&(rc==NULL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -