摘要:
二叉树的使用方法及遍历 #include "iostream.h" template class CTree { public: CTree(const T &item, CTree*lp = NULL, CTree*rp = NULL); CTree *GetLp(void) const; CTree *GetRp(void) const; CTree *GetNode(const ... 阅读全文
posted @ 2008-08-14 17:08
lizhengjin
阅读(262)
评论(0)
推荐(0)
摘要:
所谓的数据结构很容易学习,我认为关键是在于对指针的概念的深刻理解 链表类一般由操作函数和节点构成,这个节点可以是结构,也可以是一个类 如下 #include "iostream.h" struct NODE { NODE(){Hext = NULL;}//结构的构造函数,可以去掉 int a; NODE *Hext;//指向下一个 }; class CLsit { public: ... 阅读全文
posted @ 2008-08-14 13:43
lizhengjin
阅读(388)
评论(0)
推荐(0)