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

Function main

CPP/stl/pair.cpp:9–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#define endl '\n'
8
9int main(){
10 cin.tie(0)->sync_with_stdio(0);
11 //pair
12 pair<int,int> p={1,3};
13 cout<<p.first<<" "<<p.second<<endl;
14 //nesting of pair
15 pair<int,pair<int,int>> p1={1,{3,4}};
16 cout<<p1.first<<" "<<p1.second.first<<" "<<p1.second.second<<endl;
17 // array of pair
18 pair<int,int> arr[]={{1,2},{2,3},{4,5}};
19 cout<<arr[1].first<<" "<<arr[1].second<<endl;
20
21 return 0;
22}
23
24

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected