MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/vector-concepts/vector-class.cpp:11–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#define endl '\n'
10
11int main(){
12 cin.tie(0)->sync_with_stdio(0);
13 Vector v;
14 v.push_back(1);
15 v.push_back(2);
16 v.push_back(3);
17 v.push_back(4);
18 v.push_back(5);
19 cout<<v.size()<<endl;
20 cout<<v.capacity()<<endl;
21 cout<<v.at(2)<<endl;
22 cout<<v.size()<<endl;
23 cout<<v.capacity()<<endl;
24 for (int i = 0; i < v.size(); i++) {
25 cout<<v[i]<<" ";
26 }
27 return 0;
28}
29
30

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
capacityMethod · 0.80
atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected