#include<iostream>
#include<utility>
#include<vector>
#include<string>
using namespace std;
int main()
{
vector < pair<int, string>> a;
vector<int> b = { 1,2,3,4,5,6,7,8,9 };
vector<string> c = { "1","2","3","4","5","6","7","8","9" };
auto it = c.begin();
for (auto &v : b)
a.push_back(make_pair(v, *it++));
for (auto &v : a)
cout << v.first << ends << v.second << endl;
system("pause");
return 0;
}
#include<utility>
#include<vector>
#include<string>
using namespace std;
int main()
{
vector < pair<int, string>> a;
vector<int> b = { 1,2,3,4,5,6,7,8,9 };
vector<string> c = { "1","2","3","4","5","6","7","8","9" };
auto it = c.begin();
for (auto &v : b)
a.push_back(make_pair(v, *it++));
for (auto &v : a)
cout << v.first << ends << v.second << endl;
system("pause");
return 0;
}