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

Function main

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

Source from the content-addressed store, hash-verified

9
10using namespace std;
11signed main(){
12 // std::vector<int> v;
13 // v={12,13,14,15,16};
14 // fr(i,0,v.size())
15 // cout<<v[i]<<" ";
16 // cout<<endl;
17 // vector<int>::iterator it;
18 // for(it=v.begin();it!=(v.end()-1);it++)
19 // cout<<*(it+1)<<endl;
20
21 // std::vector<pair<int,int>> v;
22 // v={{12,13},{44,55},{55,66},{34,43}};
23 // fr(i,0,v.size())
24 // cout<<v[i].first<<","<<v[i].second<<endl;
25 // cout<<endl<<endl;
26 // vector<pair<int,int>>::iterator it;
27 // for(it=v.begin();it!=v.end();it++){
28 // cout<<(*it).first<<","<<(*it).second<<endl;
29 // }
30 // cout<<endl<<endl;
31
32
33
34
35 // //by using "AUTO" we can write iterator in shortcut
36 // for(auto it=v.begin();it!=v.end();it++)
37 // cout<<it->first<<", "<<it->second<<endl;
38
39
40
41 int arr[9];
42 for(auto &x:arr)
43 cin>>x;
44 for(auto z:arr)
45 cout<<z<<endl;
46
47
48 return 0;
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected