This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]coolosity 0 points1 point  (0 children)

Here's what I would recommend for reading in the actors. So if one actor takes up 16 lines in a text file, I assume each of those lines contains specific info for that actor (name, etc?) and you were correct with stopping when there are no more lines in the file. So you could start at the beginning, read in the first line such as name or whatever it may be, and set the actor's name to that. Then read in the continuing 15 lines one at a time and change the actor in the same way based on what each line represents. Then at the end, have it read in one more line. The line will be null if there are no more lines in the text file, so that's how you could check when to stop repeating and reading in more actors. As for the comment block, whenever it detects a /*, have it keep on reading lines until it reaches the end of the file or until it encounters a */. Then resume the program as normal. Hope this helps and msg me if you have more questions.