main.cpp
来自「数据结构学习中遇到的二叉树的代码」· C++ 代码 · 共 23 行
CPP
23 行
#include "BiSortTree.cpp"
#include <iostream>
using namespace std;
void main( )
{
int num;
BiNode* searchnode;
BiNode* p = NULL;
int r[10] = {63, 55, 90, 42, 58, 70, 10, 45, 67, 83};
cout<<"二叉排序树的结点数值"<<endl;
for(int i=0;i<10;++i)
cout<<r[i]<<" ";
cout<<endl;
BiSortTree bst = BiSortTree(r,10);
BiNode* root = bst.Getroot( );
cout<<"请输入要查询的数:"<<endl;
cin>>num;
searchnode=bst.SearchBST(root, num);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?