Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <utility>
- using namespace std;
- struct casa {
- vector< pair<int, casa> > v;
- };
- int main()
- {
- casa x;
- x.v.resize(2);
- x.v[0].first=1;
- x.v[0].second.v.resize(1);
- x.v[0].second.v[0].first=2;
- x.v[0].second.v[0].second.v.resize(1);
- x.v[0].second.v[0].second.v[0].first=3;
- cout<<x.v[0].first<<endl;
- cout<<x.v[0].second.v[0].first<<endl;
- cout<<x.v[0].second.v[0].second.v[0].first<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment