摘要: #include using namespace std;class Base{ protected: Base *next; public: Base(Base *t){ next... 阅读全文
posted @ 2015-03-08 23:17 机智的程序员小熊 阅读(174) 评论(0) 推荐(0) 编辑
摘要: GCC编译通过:#include #include #define N 10#define MAX 100typedef struct node{ int data; struct node *left; struct node *right;}BT... 阅读全文
posted @ 2015-03-08 23:15 机智的程序员小熊 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 按层建树是按照给定的数据数组来建立完全二叉树的过程。其中涉及到的基础知识有结构体的创建重命名以及使用、链表的创建和数组遍历。 实现代码如下: GCC编译通过:#include #include #define N 10#define MAX 100typedef ... 阅读全文
posted @ 2015-03-08 23:14 机智的程序员小熊 阅读(235) 评论(0) 推荐(0) 编辑