I have been working on my code today and have minimalized my errors. Sadly, I still have a few errors left I can't figure out how to solve.
28 F:\Program6-Arrays2.8.cpp cannot convert `double' to `double*' for argument `1' to `double getInput(double*, int)'
#include<iostream>
#include<cmath>
#include<conio.h>
#include<iomanip> //needed for setw()
using namespace std;
// Function prototypes
double getInput(double[],int);
double getLow(double[],int);
double getHigh(double[],int);
double getsum(double[],int);
int main()
{
const int SIZE=8;
int num;
double numbers;
double sum;
double lowestscore;
double highestscore;
double scores[SIZE];
double array[0];
cout << setprecision(1) << fixed << showpoint;
sum= getInput(numbers,SIZE);
lowestscore = getLow (array,SIZE);
highestscore = getHigh (array,SIZE);
sum = getsum (array,SIZE);
sum -= lowestscore;
sum -= highestscore;
cout << "Contestant Receives: " << sum << endl;
cout << "Dropped Low Score: " << lowestscore << endl;
cout << "Dropped High Score: " << highestscore << endl;
return 0;
}
double getInput(double numbers[],int size)
{
int index;
for(index = 0; index <= size - 1;index++)
{
cout << "Enter Judges Score #" << (index+1) << ":";
cin >> numbers[index];
}
}
double getLow(double array[], int size)
{
double lowest;
int counter=1;
lowest = array[0];
for(int counter = 1; counter < size ; counter++)
{
if( array [counter] < lowest)
lowest = array [counter];
return lowest;
}
double getHigh( double array[] , int size);
{
double highest;
highest = array[0];
for(int counter = 1; counter < size ; counter++)
{
if(array [counter] > highest)
highest = array [counter];
return highest;
}
double getsum(double array[],int size);
{
double sum=0;
for(int count = 0 ;count < size ;count++)
sum += array [count];
return sum;
}
}
}