I'm trying to make an array that stores all the names, and another array that stores the # of votes for each name
from an external txt file
the txt file contains all words (voting results)
something like:
"Name: Amey"
"Voted For: Stephen Harper"
"Name: Usman"
"Voted For: Thomas Mulcair"
so everytime the system reads a name, it searches the name array to see if the name was registered before, if it was, then you just add one to the #of votes of this person, and if not, then put the name in the names array then you make the votes for that person = 1.
I'm kinda confused to how to write the syntax for this array loop
if the name is not registered before, (when the teacher changes your txt file) how can you record it into your names array and add one each time it appears?