bithreadtree.cpp

来自「二叉树的中序线索化」· C++ 代码 · 共 33 行

CPP
33
字号
// BiThreadTree.cpp : Defines the entry point for the console application.
//


#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "vld.h"
#include "..\header\BiThrTree.h"

int main(int argc, char* argv[])
{
	BiThrTree root,Thrt;

	printf("按先序序列输入二叉树各结点(ex. ABC##DE#G##F###):\n");
	CreatBinTree(root);
	
	InOrderThreading(Thrt,root);
	printf("中序法遍历线索化二叉树:\n");

	InOrderTraverse_Thr(Thrt, Visit); 

	DestroyBinTree(root);
	
	if(Thrt)
	{
		free(Thrt);
		Thrt = NULL;
	}
	system("Pause");
	return 0;
}

⌨️ 快捷键说明

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