Hi guys. I am currently making a Question and Answer multiple choice Program. So far it is good. I used Array to shuffle 50 questions. the problem of the program is it cannot count the right answers and display it. This is the part of the program that has an error.

cout<<x[list[0]]<<endl;
cin>>a;
if (a==y[list[0]])
i++;
cout<<"Total= "<<i<<"\n"<<endl;

Can you please tell me what is wrong with it? If you want to see my whole program just ask me and i hope you can help me.

Yes, need more context. Post more. And tell us what it is doing that makes you say that it doesn't work.

i cant get ur problem....
just show ur program

when you shuffle the questions do you also shuffle the answers at the same time, that is, when a swap is needed you have to swap elements in both arrays so that the two arrays remain in the same order.

Oh well, I just answered a dead thread :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.