Heyo - I'm still pretty new at programming and I've been trying to figure out what I'm doing wrong in calling the low_highScores() function below. Is the problem in my function itself or how I'm calling it? I've tried everything I can think of and all errors point to the various ways I'm trying to call it. Any help would be much appreciated.
The pasted the entire code at
http://rafb.net/p/7ZYfQK73.html
void getNineHoles(int NineHoles[]) //Gets stats for 9 holes and displays them
{
for (int i=0; i<9; i++)
{
cout << "Enter stats for 9 holes ";
cin >> NineHoles[i];
}
for (int i=0; i<9; i++)
{
cout << NineHoles[i] << endl;
}
low_highScores(int NineHoles[i]);
return;
}
int low_highScores(int NineHoles[9])
{
//int const MAX = 9;
int lowest;
int highest;
int total; // total for use with average func
for ( int i = 0 ; i < 9 ; i++ ) //find the highest and lowest value in the array
{
if ( lowest < NineHoles[i]) //find the lowest value
{
lowest = NineHoles[i];
}
if ( highest > NineHoles[i]) //find highest value
{
highest = NineHoles[i];
}
total += NineHoles[i];
}
cout << "Your best hole this game was a " << lowest << "." << endl;
cout << "Your worst hole was a " << highest << "." << endl;
//cout << "Your average score for the 9 holes was " << average << "." << endl;
return 0;