Tree.h
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:0k
源码类别:
Windows编程
开发平台:
Visual C++
- //INTERFACE TO THE BINARY TREE
- //FILE TREE.H
- #include<conio.h>
- #include<stdio.h>
- class NODE
- {
- friend class TREE;
- private:
- int DATA;
- NODE *LEFT;
- NODE *RIGHT;
- };
- class TREE
- {
- private:
- NODE *ROOT;
- public:
- TREE()
- {
- ROOT=0;
- }
- void BUILD_TREE(NODE *&Root,int Data);
- int SEARCH_TREE(NODE *Root,int Data);
- void TREE::DISPLAY_TREE(NODE *Root);
- ~TREE(){}
- };