Incompatible Declaration

I don't understand why my module declaration is incompatible with the prototype section.


#include <iostream>
#include <cstdlib>
#include <cmath>

using namespace std;
//prototype section
void programInfo();
void inputList(double values[], int &count);


int main()
{
int count;
double values[20]; // also when i try to set the array value to count, it says that the value has to be a constant value. Is it possible to set it to a counting variable?


cout << "Author: Edwin Trinh\n";

programInfo();
inputList(values, count);

return 0;
}
//definitions section
void programInfo()
{
cout << "This program requires you to enter at least 3 positive real values, but not more than 20." << endl;
}

void inputList(values[20], int &count)
{

}
You aren't specifying the type of values in your definition of inputList. I also wouldn't bother specifying the size of the array in the function prototype/definition since it doesn't do anything in those cases.
Wow.. Can't believe I didn't catch that. Thanks!
Topic archived. No new replies allowed.