I am trying to make a quiz with visual basic, i have to load the quiz from a text file in this format:
question, answerA, answerB, answerC, answerD, Actual answer
Question2,answer a, answer b, answer c, answer d, Actual answer
Question3..... and so on
i need a way that when i press next, the next question will show up. Right now the text file is in an single dimension array so question(0) would be the question and question(6) would be the second question
[/ FileOpen(1, "quiz.txt", OpenMode.Input) 'open file to input all questions into an array
'Loop to input questions into array
Dim questions(Counter - 1) As String
For index As Integer = 0 To Counter - 1
Input(1, questions(index))
Next
questionBox.Text = questions(0)
answerBtnA.Text = questions(1)
answerBtnB.Text = questions(2)
answerBtnC.Text = questions(3)
answerBtnD.Text = questions(4)
FileClose(1)
End Sub
]
Any help would be great, I am completely stuck
Quiz program, array help
Page 1 of 11 Replies - 350 Views - Last Post: 06 November 2012 - 09:41 AM
Replies To: Quiz program, array help
#2
Re: Quiz program, array help
Posted 06 November 2012 - 09:41 AM
Please don't create multiple threads for the same question.
You already have a thread going for this:
http://www.dreaminco...1&#entry1739431
Also, please follow the guidelines about using code tags just like everyone else.
We can't make it much more obvious than in the box where you typed your question.


If you check the homework help link in my signature block you'll see there is a section devoted to this common homework task of making a quiz program.
You already have a thread going for this:
http://www.dreaminco...1&#entry1739431
Also, please follow the guidelines about using code tags just like everyone else.
We can't make it much more obvious than in the box where you typed your question.

If you check the homework help link in my signature block you'll see there is a section devoted to this common homework task of making a quiz program.
Page 1 of 1
|
|

New Topic/Question
This topic is locked



MultiQuote




|