TREE.H
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:1k
源码类别:
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);
- void TREE::LR_PREORDER(NODE *Root);
- void TREE::LR_INORDER(NODE *Root);
- void TREE::LR_POSTORDER(NODE *Root);
- void TREE::RL_PREORDER(NODE *Root);
- void TREE::RL_INORDER(NODE *Root);
- void TREE::RL_POSTORDER(NODE *Root);
- ~TREE(){}
- };