you can delete score1, score2, ... score5 from the class because they are not needed. You can initialize a vector with 5 integers by using its resize() method
scoreList.resize(5); and each element is initialized to 0.
So the constructor reduces to this:
ScoreChop::ScoreChop()
{
loScore = 0;
avgScore = 0;
scoreList.resize(5);
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343