how to pair up both string and integer in input
Sort game problem
Take pair<string,int> employees[100005];
and then while you take input, use
for(int i=0;i<n;i++)
{
cin>>name>>salary;
employees[i].first=name;
employees[i].second=salary;
}
how to pair up both string and integer in input
Take pair<string,int> employees[100005];
and then while you take input, use
for(int i=0;i<n;i++)
{
cin>>name>>salary;
employees[i].first=name;
employees[i].second=salary;
}