binarytreetest.cpp

来自「里面包含各种数据结构方面的知识,如链表,树,图等 含有vc代码」· C++ 代码 · 共 25 行

CPP
25
字号
#include <conio.h>
#include "BiTreeLib.h"
#include "BiTreeExample.h"

void main(void)
{
	BiTreeNode<char> *root1, *root2;

	MakeCharTree(root1, 1);
	MakeCharTree(root2, 2);
	cout << "root1树为:" << endl;
	PrintTree(root1, 0);
getch();
	cout << "root2树为:" << endl;
	PrintVTree(root2);
	cout << "\nroot2树后序遍历结点次序为: ";
	Postorder(root2, Printchar);
	int leafCount = 0;
	CountLeaf(root2, leafCount);
	cout << "\nroot2树的叶子结点个数为: " << leafCount;
getch();
}


⌨️ 快捷键说明

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