hoe to combine three vectors together
hello,
i want to ask a question, how i can create a quiz system that can generate a questions for me. for example quiz software to test knowledge of countries and their currencies
what is the currency of UK?
what is the currency of US?
The questions should be generated dynamically and the name of the country must come from a map which initialized. The student answers by typing the name of the currency and pressing ENTER key and the software shows another question with the name of a different country - this should continue until the software the iterated over all the countries in the map
Each time the student enters an answer you check the map to see if his/her answer is correct. The software should make a record of which questions were answered correctly and which questions were answered incorrectly.
Use a Vector to store answers which were answered incorrectly so that they can displayed in the report
i have started with this part of code:
Code:
#include<map>
#include<iostream>
using namespace std;
int main(){
map<string, string> currency;
currency["china"]="yen";
currency["US"]="dolar";
map<string, string>:: iterator it;
for(it=currency.begin(); it!=currency.end(); it++){
cout<<"what is the currency of"<<(*it).first<<"?"<<"\n";
cout<<"\n";
cin>>(*it).second;
cout<<"\n";
}
cin.get();
}
could you help me please, i stop in this point and i get confuse.
thanks,