Hello! So I have this homework that i have no idea how to continue.
this is an exemple of input,but i have to do it for a general one:
7
pencils car ball candy tshirt bike video_game
Mike Andrew Inna
and the output must be like this:
Mike: pencils candy video_game
Andrew: car tshirt
Ioana: ball bike
we have to use a queue and this is what I wrote,but I don't know what should i do next. Can Somebody help me,please?
#include <iostream>
#include<queue>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
int main() {
int n,j=0;
queue<string> cadouri;
vector<string> names;
string ob,nume1;
cin>>n;
for(int i=0 ;i<n;i++) { //push the 7 things in the queue
cin >> ob;
cadouri.push(ob);
}
while(cin>>nume1)//push the names in the vector
{
names.push_back(nume1);
j++;
}
???
return 0;
}