Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- tuple <unsigned,string,float> pers[10];
- unsigned id=0,cid;
- string name,cname;
- float h,ch;
- for (int i=0;i<3;i++)
- {
- id++;
- cout<<"name=";cin>>name;
- cout<<"h=";cin>>h;
- pers[i]=make_tuple(id,name,h);
- }
- for (int i=0;i<3;i++)
- {
- cout<<get<0>(pers[i])<<endl;
- }
- tie(cid,cname,ch)=pers[1];
- cout<<cid<<' '<<cname<<' '<<ch;//*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement