摘要: #include <iostream>#include <string> using namespace std; int main(){ string str1("hello"); string str2(" study c++"); string::iterator str_iter = str 阅读全文
posted @ 2019-06-09 20:08 西北逍遥 阅读(873) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string> using namespace std; int main(){ string a1; cout << a1<< endl; string s2(5,'a'); cout << s2 << endl; string s3(s2 阅读全文
posted @ 2019-06-09 19:42 西北逍遥 阅读(1616) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector> using namespace std; int main(){ vector<int> vec1; for (int k=0;k<20;k++) { vec1.push_back(k); cout << "size:"<<v 阅读全文
posted @ 2019-06-09 17:14 西北逍遥 阅读(380) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>#include <list>#include <deque> using namespace std; int main(){ vector<int> a; vector<int> b; a.push_back(10); a. 阅读全文
posted @ 2019-06-09 16:14 西北逍遥 阅读(754) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <list>#include <algorithm>#include <string> using namespace std; int main(){ list<string> slist; slist.push_back("A"); sli 阅读全文
posted @ 2019-06-09 15:49 西北逍遥 阅读(305) 评论(0) 推荐(0) 编辑