i make some changes on the code and try to solve it using Qt Create. But there is just three errors i try to solve it. Could you help me please
Code:
#include<QtCore/QCoreApplication>
#include<QVector>
#include<QMap>
#include<QString>
#include<QDebug>
classQuiz{
private:
inti,countR,countW;
QMap<QString,QString>my_map;
QVector<QString>my_vec;
public:
Quiz();
voidstart();
};
Quiz::Quiz(){
}
voidQuiz::start(){
my_map["UK"]="Dollarl";
my_map["UAE"]="Derham";
my_map["China"]="Yen";
QVector<QString>::iteratormy_it;
QMap<QString,QString>::iteratorit;
i=1;
countR=0;
countW=0;
QStringans;
for(it=my_map.begin();it!=my_map.end();it++){
qDebug()<<"Q"<<i<<"whatisthefullformfor"+(*it).first<<"?\n";
cin>>ans;
if((*it).second==ans){
countR++;
}
else{
countW++;
}
i++;
}
qDebug()<<"ResultofITacronymsQuize"<<endl;
qDebug()<<"TotalQuestion:10"<<endl;
qDebug()<<"Correctanswers:"<<countR<<""<<endl;
qDebug()<<"Wronganswers:"<<countW<<""<<endl;
qDebug()<<"Youscored"<<countR*10<<"%onthisquize"<<endl;
system("pause");
}
intmain(intargc,char*argv[]){
QCoreApplicationa(argc,argv);
QuizQ;
Q.start();
}