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

📄 2-3tree.cpp

📁 2-3树的数据结构以及演示程序
💻 CPP
字号:
// 2-3Tree.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	Tree23 <int> t = Tree23 <int> ();

	char ans = 'y';
	int toInsert;
	while (ans != 'n' && ans != 'N') {
		t.formatPrint();
		General::Input("请输入要插入的结点数据域的值:", toInsert);
		if (!t.Insert(new int(toInsert))) {
			cout<<"此结点已存在,插入失败!"<<endl;
			General::pause();
		}
		else cout<<"结点"<<toInsert<<"插入成功!"<<endl;
		t.formatPrint();
		General::pause();
		General::Input("还要继续插入吗?(Y/N)", ans);
	}
	General::pause();
}

⌨️ 快捷键说明

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