0

Hello all, I've been writing a multiple choice question version of the game Hangman. I've got it done except for stopping already asked questions from appearing again. I've got the 'asked' question numbers (the questions and answers are read in from a file into various arrays) added to a vector list as they are asked. My problem: I'm having difficulty setting up a search algorithm for the vector list to compare the randomly generated question numbers to the values in the vector. Here's a small snippet of my program where I'm having difficulty. I'm getting myself more confused by the minute trying to sort this out.

```
QuestionInfo[] questionObj = new QuestionInfo[10];
for(int x = 0; x < 10; x++)
questionObj[x] = new QuestionInfo(question[x], ansA[x], ansB[x], ansC[x], ansD[x], correctAns[x]);
questionNum = (int)(Math.random() * 10);
usedList.addElement(questionNum);
QuestionInfo curQues = new QuestionInfo(questionObj[questionNum]);
displayQuestion(questionObj, curQues, questionNum);
```