I have a file that has three players names and how many touchdowns scored and how many catches they have caught. I know the code for opening up the file and reading it but I dont understand how to add each category. For example the file is like this.
John
2: 5
Micheal
1: 4
Patrick
2: 7
So for the output I want it to read:
Touchdowns: 5
Catches: 16
I know the output code is
cout<<"Touchdowns: "<<touchdown<<endl;
cout<<"Catches: "<<catches<<endl;