65,211
社区成员
发帖
与我相关
我的任务
分享//调用
void main()
{
bool b=true;
while (b)
{
b=Question();
}
}
int Question(int QuestionIndex)
{
int index=QuestionIndex;
std::string question=LoadQuestion(index);//从数据库加载指定编号的问题
vector<std::string> answervec=LoadAnswer(index);//从数据库加载备选项
std::string rightanswer=LoadRightAnswer(index);//从数据库加载正确答案
//显示问题
//获取用户输入的答案
//验证答案是否正确
if (//答案错误)
{
//继续等待直到用户输入正确答案
}
//返回是否答对
}