#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
vector<int> a,b(10);
a.push_back(6);
b.push_back(45);
cout << a[0] << b[10] << endl;
cout << a.size() << " " << b.size() << endl;//1 11
a.clear();
b.clear();
cout << a.size() << " " << b.size() << endl;//0 0
return 0;
}
vector之清空
最新推荐文章于 2024-01-11 16:06:12 发布