vector of pairs declaration in cpp
vector<pair<int,int>>v;
vector of vectors of pairs c++
vector<vector<pair<int, float>>> vec(10, vector<pair<int, float>>(5, pair<int, float>(0, 0)));
for (int i = 0; i < vec.size(); i++)
{
for (int j = 0; j < vec[i].size(); j++)
{
cout << vec[i][j].first << " ";
cout << vec[i][j].second << " ";
}
cout << endl;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us