I'm new to this forum as you can tell and I am also relatively new to coding. This semester I am taking a c++ course without any previous knowledge of code. Anyway I would like your insight on this assignment I am working on.
So far I have gathered the following things that I will need:
I need to declare a map with both string and int. String to hold the names and int to hold their points.
I need a for loop (I think) to keep a running total of the scores.
I need a map iterator.
My question is how do I parse through the text and tie everything together. I have posted the assignment below. Just a note before anyone gets upset: I want tips on how to go about doing this. By tips I mean like "Hey you need to declare a variable to store blah blah blah" or "Instead of a for loop you're going to need a while loop because blah blah blah"
THANK YOU SO MUCH FOR READING!
For this assignment, you will write a program to analyze some formatted data in a text file. Scores for 200 games (one game per line) in an accountants' kickball league are provided here: scores.txt.
(They are in a standardized format with the score for one match on each line, with the score for each team after its name.) Your job is to write a program which parses this file, keeping a running count of how many points are scored by each team (PF) and against each team (PA), printing those values out on the console in this format: