#include<bits/stdc++.h>
using namespace std;
int main() {
int x;
cin>>x;
int n;
cin>>n;
vector< pair<string,int> > v[n];
for(int i=0; i<n; i++){
cin>>v[i].first;
cin>>v[i].second;
}
return 0;
}
What is wrong in this code
everything seems right? what’s the problem statement ? also share entire code using ide.codingblocks.com
okay got it. you have to use make pair and then you have to push it in vector. Wait let me show you.
Check now =>
To insert a pair in vector we have to use make pair . see this
You will get an idea.