I am trying to find a way to count the number of lines in a text file as a quiz for example:
Question,answer1,answer2,asnwer3,asnwer4,answer
Question2,answer,answer,answer,answer,realanswer
The answer i want to get is 12.. 6 on each line.
After i do that I need to get each piece into a variable.. for example questionOne(0) would be the very first then question(1) would be answer 1...
Any help, or if anyone has a better idea on how to do that, I am making a quiz program, and I am at a complete lost. Thanks
Text File questions
Page 1 of 12 Replies - 354 Views - Last Post: 06 November 2012 - 01:58 PM
Replies To: Text File questions
#2
Re: Text File questions
Posted 06 November 2012 - 06:28 AM
I have the counter working.. Now its to store the each line in an array or somehow to store each item separately
#3
Re: Text File questions
Posted 06 November 2012 - 01:58 PM
Please read the article linked in my signature block: Homework help.
One of the case studies is how to build a quiz program.
Please tell me you don't really have a Question1, Question2, Question3 set of variables.
You are using an array of Question objects (class instances) right?
Here is another thread for the same homework, just in a different coding language that isn't 20 years out of date. Maybe it will help.
http://www.dreaminco...7&#entry1739847
One of the case studies is how to build a quiz program.
Please tell me you don't really have a Question1, Question2, Question3 set of variables.
You are using an array of Question objects (class instances) right?
Here is another thread for the same homework, just in a different coding language that isn't 20 years out of date. Maybe it will help.
http://www.dreaminco...7&#entry1739847
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|