you declared the constructor as
Code:
ScoreBank( int = 0 ); // default constructor
but you implemented
Code:
// default constructor
ScoreBank::ScoreBank( float _score )
: ptrScore( _score )
{
} // end ScoreBank constructor
Guess your constructor shouldn't take any parameters because you actually have a function to ask the user for the number of TestScores. EnterScores() should also not take any parameters.
Code:
// default constructor
ScoreBank::ScoreBank( )
: TestScores( 0 ),
ptrScore( 0 )
{
}
void ScoreBank::EnterScores( )
{
cout << "How many test scores are needed? ";
cin >> TestScores;
ptrScore = new float[TestScores];
// here you should put some values into the array.
// possibly by calling
GetScores();
} // end function EnterScores
use it this way
Code:
ScoreBank score;
score.EnterScores();
score.OutPut();
BTW GetScores() cannot be const because it will modify the object.
Kurt