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

📄 emp5_13.cpp

📁 该包是数据结构的实验软件,来源于合肥工业大学人工智能与数据挖掘实验室,用来实现数据结构.
💻 CPP
字号:
// emp5_13}
#include "btrechar.h"

void pppp(bitre &t,bitre &pre,bptrlink &ptrpre,bptrlink &ptrt)
{
	if (t!=NULL){
		pppp(t->lchild,pre,ptrpre,ptrt);
		pppp(t->rchild,pre,ptrpre,ptrt);
		bptr_point_to(ptrpre, pre);
		getch();
		bptr_point_to(ptrt, t);
		getch();
		if ((pre!=NULL) && (pre->rtag==1)){
			pre->rchild=t;
			rthread_point_to(pre,t);
			getch();
		}
		if (t->lchild==NULL){
			t->lchild=pre;
			t->ltag=1;
			dispint_atbnode_angle(1,t,150);
			lthread_point_to(t,pre);
			getch();
		}
	    if (t->rchild==NULL){
	    	t->rtag=1;
	    	dispint_atbnode_angle(1,t,0);
	    }
	    pre=t;
	}
}

void main()
{
    bitre t,pre;
    int k;
    bptrlink ptrt,ptrpre;
    initial_bitre();
    load_bitre_file(t,"bitres\\full41.cbt");
    comput_bitre_card(t);
    window(1,1,80,3);
    create_bptr(ptrt, "T"); 
    create_bptr(ptrpre, "pre");
    disp_bitre("Post",t);
    pre=NULL;
    pppp(t,pre,ptrpre,ptrt);
    disp_thbitre("pppp",t);
    getch();
}

⌨️ 快捷键说明

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