摘要: 头文件: 1 #ifndef STACK_H 2 #define STACK_H 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int stackIncreament=20; 9 10 template 11 class SeqStack12 {13 public:14 //SeqStack(){} //new15 SeqStack(int sz);16 //~SeqStack();17 void Push(const T &x);18 void Pop(co... 阅读全文
posted @ 2013-10-31 15:00 ruirui610 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 头文件: 1 //功能代码已经全部改写完成了,只剩下的就是测试部分了,单链表改循环链表还是很容易改的! 2 //采用模板类来写的代码,不能分开写! 3 4 #ifndef LINKEDCircList_H 5 #define LINKEDCircList_H 6 7 template 8 struct CircLinkNode 9 {10 T data;11 CircLinkNode *link;12 CircLinkNode(CircLinkNode *ptr=NULL){link=ptr;}13 CircLinkNode(const T& item,C... 阅读全文
posted @ 2013-10-31 14:50 ruirui610 阅读(755) 评论(0) 推荐(0) 编辑