-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvector.cpp
43 lines (36 loc) · 830 Bytes
/
vector.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// #include<iostream>
// #include<vector>
// using namespace std;
// int main(){
// vector<int> vec(5,0)
// }
// #include<iostream>
// #include<vector>
// using namespace std;
// int main(){
// vector<int> vec(5,0);
// for (int i : vec){
// cout <<i <<endl;
// }
// }
// #include<iostream>
// #include<vector>
// using namespace std;
// int main(){
// vector<char> vec('a','b','c','d');
// for (char val: vec){//for each loop
// cout <<val <<endl;
// }
// }
// #include<iostream>
// #include<vector>
// using namespace std;
// int main(){
// vector<char> vec;
// vec.push_back(0);
// vec.push_back(1);
// vec.push_back(2);
// cout <<vec.size()<<endl;//3
// cout <<vec.capacity()<<endl;//4
// return 0;
// }