摘要:
#include<iostream> #include<stdlib.h> #include<string> #include<vector> using namespace std; /* 3.2.7 vector互换空间 实现两个容器内元素进行互换 swap(vec); // 将vec与本身的元 阅读全文
posted @ 2021-04-23 15:11
yub4by
阅读(74)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<stdlib.h> #include<string> using namespace std; #include<vector> /* 3.2.4 vector容量和大小 empty(); //判断容器是否为空 capacity(); //容器 阅读全文
posted @ 2021-04-23 14:38
yub4by
阅读(106)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<stdlib.h> #include<string> using namespace std; #include<vector> void pv(vector<int> & v) { for(vector<int>::iterator it=v 阅读全文
posted @ 2021-04-23 12:51
yub4by
阅读(133)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<stdlib.h> #include<string> using namespace std; void test1() { string str = "hello"; cout << str << endl; //read for(int i 阅读全文
posted @ 2021-04-23 11:13
yub4by
阅读(103)
评论(0)
推荐(0)