Hi All,
Thank you for reading this and helping me! I am finishing off my program with a method that can compute Average Scores from a list of data. It's giving me an error that says "invalid use of member (did you forget the â&â ?)". Below is the code that I'm working on, the
error is the line with the Sum =. Please Help me figure out a way to sum up all the scores successfully!
int Team::AverageHome()
{
int Average = 0;
int Sum = 0;
int Number = 0;
int i;
for( i = 0; i < NumGames; i++)
{
Sum = Sum + Games[i].GetHomeScore;
}
Average = Sum / i;
return Average;
}