RainFall "Hyper-Functionalizing" Issue

Hello again! So, after having built this program up, I am getting the same error with several functions, but I'm not sure what it means or what to change
" error LNK2019: unresolved external symbol "void __cdecl computeDifference(double,double,double)" (?computeDifference@@YAXNNN@Z) referenced in function _main"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  #include <iostream>
#include <iomanip>
#include <fstream>
#include <string>

using namespace std; 
const int MAX = 12;
 
void promptUser(string & fileLocation);
void readFile(double rainAry, string fileLocation);
double computeAverage(double rainAry, double  average);
void computeDifference(double rainAry, double average, double aryDiff);
void printResults(double rainAry, double average, double aryDiff, string aryMonth);

	int main()
{
	string fileAt; 
	double rainGauge[MAX];
	double averageRain;
	double diffAry[MAX];
	string monthAry[MAX] = {"January", "February", "March", "April", "May", "June", "July", "August", 
		"September", "October", "November",	"December"};

	promptUser(fileAt);
	cout << fileAt;
	readFile(rainGauge[MAX], fileAt);
	computeAverage(rainGauge[MAX], averageRain);
	computeDifference(rainGauge[MAX], averageRain, diffAry[MAX]);
	printResults(rainGauge[MAX], averageRain, diffAry[MAX], monthAry[MAX]);
	return 0;
}

void promptUser(string & fileLocation)
{

	cout <<"Enter the file location of your rain measurements: ";
	cin >> fileLocation;
}
void readFile(double rainAry[MAX], string fileLocation)
{
	fstream inFile;
	fstream outFile;

	inFile.open(fileLocation.c_str());
	
	for (int i = 0; i < MAX; i++)
	{
		inFile >> rainAry[i];
	}
}

double computeAverage(double rainAry[MAX], double average)
{
	double total;

	for(int i = 0; i < MAX; i++)
	{
		total = total + rainAry[i];
	}
	average = total / MAX;
return average; 
}

void computeDifference(double rainAry[MAX], double average, double aryDiff[MAX])
{
	for (int i = 0; i < MAX; i++)
	{
		aryDiff[i] = rainAry[i] - average;
	}
}


void printResults(double rainAry[MAX], double average, double aryDiff[MAX], string aryMonth[MAX])
{
	cout << setprecision(10) << "Month" << setprecision(10) << "Rain Fall" << setprecision(10) << "Average" <<
		setprecision(10) << "Difference" << endl;
	for (int i = 0; i < MAX; i++)
	{
		cout << setprecision(10) << aryMonth[i] << setprecision(10) << rainAry[i] << setprecision(10) << average <<
			setprecision(10) << aryDiff[i] << endl;
	}
}
Your definitions do not match your implementations.
Also, I think you need to review how to pass arrays.
"Also, I think you need to review how to pass arrays."
Why is that?
passing arrays is something we just covered in our last class, so I am a little iffy on them still, I'll go back and take a look again
Looking at my book, it seems like what I'm doing should work, I'm rather off on this...
Topic archived. No new replies allowed.