书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2011年11月23日

vector的小小应用,大大功能

摘要: DescriptionAs a contestant, you must be familiar with the rules of ACM-ICPC. Teams are ranked according to the most problems solved. Teams who solve the same number of problems are ranked by least total time. The total time is the sum of the time consumed for each problem solved. The time consumed f 阅读全文

posted @ 2011-11-23 13:14 More study needed. 阅读(261) 评论(0) 推荐(0) 编辑

vector中的各种函数演示

摘要: 1.初始化演示2.push_back()演示3.insert()演示4.pop_back()演示5.erase()演示6.size()演示7.empty()演示8.assign()演示#include<iostream>#include<vector>using namespace std;typedef vector<int> vint;int main(){ cout<<"初始化对象:"<<endl; vint vec1; ///vec1对象初始为空 vint vec2(10, 6); ///vec2对象最初有 阅读全文

posted @ 2011-11-23 10:24 More study needed. 阅读(245) 评论(0) 推荐(0) 编辑

vector的第四种初始化演示

摘要: #include<iostream>#include<vector>#include<cstring>using namespace std;int main(){ int arr[10] = {12,34,566,45,64,9,45,98,35,2}; char *str = "Hello vector!"; vector <int> vector1(arr, arr+10); vector <char> vector2(str, str+strlen(str)); cout<<"vect 阅读全文

posted @ 2011-11-23 10:11 More study needed. 阅读(224) 评论(0) 推荐(0) 编辑

导航

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!