数据结构
wengtengfan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
基于链表的容器类bag实现
链表类头文件: #ifndef MAIN_WTF_NODE1_H #define MAIN_WTF_NODE1_H #include namespace main_wtf_5 { class node { public: typedef double value_type; node(const value_type& init_data = value_ty原创 2016-07-22 19:28:05 · 594 阅读 · 0 评论 -
模板容器类的实现一(基于动态数组)
头文件: #ifndef MAIN_WTF_BAG4_H #define MAIN_WTF_BAG4_H #include namespace main_wtf_6 { template class bag { public: typedef Item value_type; typedef std::size_t size_type; static c原创 2016-07-27 15:16:15 · 500 阅读 · 0 评论 -
模板容器类及迭代器的实现二(基于链表)
节点类头文件node.h: #ifndef MAIN_WTF_NODE1_H #define MAIN_WTF_NODE1_H #include namespace main_wtf_6B { template class node { public: typedef Item value_type; node(const Item& init_data =原创 2016-07-27 15:20:19 · 469 阅读 · 0 评论 -
基于静态数组的容器类bag实现
头文件bag1.h: #ifndef MAIN_WTF_H #define MAIN_WTF_H #include namespace main_wtf_1 { class bag { public: typedef int value_type; typedef std::size_t size_type; static const size_type CAPA原创 2016-07-18 16:36:28 · 481 阅读 · 0 评论 -
动态数组的容器类bag
头文件bag2.h: #ifndef MAIN_WTF_BAG2_H #define MAIN_WTF_BAG2_H #include namespace main_wtf_4 { class bag { public: typedef int value_type; typedef std::size_t size_type; static const size原创 2016-07-18 16:43:18 · 541 阅读 · 0 评论 -
具备迭代器功能的容器类sequence
头文件sequence.h: #ifndef MAIN_WTF_SEQUENCE_H #define MAIN_WTF_SEQUENCE_H #include namespace main_wtf_2 { class sequence { public: typedef double value_type; typedef std::size_t size_t原创 2016-07-18 16:47:10 · 726 阅读 · 0 评论 -
C++ String类的实现
string头文件: #ifndef MAIN_WTF_STRING_H #define MAIN_WTF_STRING_H #include using namespace std; namespace main_wtf_5 { class string { private: char* characters; //存储字符串数据原创 2016-07-20 12:15:38 · 615 阅读 · 0 评论 -
有向图的C++实现
graph.h: #ifndef MAIN_WTF_GARPH_H #define MAIN_WTF_GARPH_H #include #include namespace main_wtf_graph { template class graph { public: // enum { MAXIMUN = 20; } static const std::原创 2016-08-21 16:29:48 · 5097 阅读 · 0 评论
分享