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.

if (a==y[list[0]])
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.

Recommended Answers

All 4 Replies

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, learning, and sharing knowledge.