上一页 1 2 3 4 5 6 7 ··· 16 下一页

2015年6月14日

字符串结构

摘要: 1 // string 2 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void main()10 {11 string str1 = "ABC";12 string str2 = "XYZ";... 阅读全文

posted @ 2015-06-14 15:04 Dragon-wuxl 阅读(142) 评论(0) 推荐(0)

链式队列数组队列优先队列以及非基本数据类型

摘要: 1 // queue 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 // queue stack 默认都是deque线性实现11 // 可以强行指定list链式存储12 /... 阅读全文

posted @ 2015-06-14 14:28 Dragon-wuxl 阅读(141) 评论(0) 推荐(0)

链式栈与数组栈

摘要: 1 // stack 2 #include 3 #include 4 #include 5 using namespace std; 6 7 8 void main() 9 {10 // stack 底层是deque11 // stack 没有迭代器12 stack ... 阅读全文

posted @ 2015-06-14 10:31 Dragon-wuxl 阅读(119) 评论(0) 推荐(0)

deque双端队列

摘要: // deque 线性#include#includeusing namespace std;void main(){ deque myd = {1,2,3,4,5,6}; myd.push_back(13);// 尾部插入 myd.push_front(0);// 前端插入 ... 阅读全文

posted @ 2015-06-14 10:10 Dragon-wuxl 阅读(128) 评论(0) 推荐(0)

线性存储与链式存储迭代器的不同

摘要: 1 /* 线性存储与链式存储迭代器的不同 */ 2 3 /* 容器: 4 8 */ 9 10 11 12 #include13 #include14 15 using namespace std;16 17 // vector18 void main()19 {20 vect... 阅读全文

posted @ 2015-06-14 08:56 Dragon-wuxl 阅读(158) 评论(0) 推荐(0)

final与override

摘要: 1 /* final与override */ 2 3 #include 4 5 6 using namespace std; 7 8 class myclass 9 {10 public:11 virtual void run()12 {13 14 }15 16 ... 阅读全文

posted @ 2015-06-14 08:25 Dragon-wuxl 阅读(122) 评论(0) 推荐(0)

2015年6月13日

线性容器

摘要: 1 /* 线性容器 */ 2 3 4 #include 5 #include 6 #include// 栈上的数组 7 #include// 堆上的数组 8 #include// 双链表 9 #include// 算法 10 11 using namespace std; ... 阅读全文

posted @ 2015-06-13 14:51 Dragon-wuxl 阅读(229) 评论(0) 推荐(0)

STL四大重要组件

摘要: 1 /* STL四大重要组件 */ 2 3 4 #include 5 #include 6 #include 7 #include 8 9 using std::function;// 使用仿函数 10 11 using namespace std; 12 13 // ... 阅读全文

posted @ 2015-06-13 10:07 Dragon-wuxl 阅读(287) 评论(0) 推荐(0)

2015年6月12日

类成员函数

摘要: 1 /* 类成员函数 */ 2 3 4 #include 5 6 using namespace std; 7 8 // 类成员函数指针 类成员二级函数指针 类成员函数指针数组 9 10 11 class op12 {13 public:14 op(int x,int y):a... 阅读全文

posted @ 2015-06-12 17:46 Dragon-wuxl 阅读(171) 评论(0) 推荐(0)

类模板与静态函数

摘要: 1 /* 类模板与静态函数 */ 2 3 /* 类模板静态函数 */ 4 5 #include 6 7 using namespace std; 8 9 // 类,类模板的静态成员函数不可以访问this10 // 类模板没有实例化 没有调用就不会编译11 12 template13 cla... 阅读全文

posted @ 2015-06-12 17:14 Dragon-wuxl 阅读(421) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 16 下一页

导航