Array issue

Anyone know what this error means? error LNK2019: unresolved external symbol "void __cdecl LLParams(double const * const,double const * const,int,double &,double &)" (?LLParams@@YAXQBN0HAAN1@Z) referenced in function _main

There are 2 connected header files and another cpp file, not sure if that matters.

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
double computeSum(double *xData, double *yData, double dataSize, double &m, double &b)
{
  int i;
  double sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0, temp;

  for (i = 0; i < dataSize; i++)
  {
    temp = xData[i] * yData[i];
    sum1 = sum1 + temp;
  }

  for (i = 0; i < dataSize; i++)
  {
    temp = xData[i];
    sum2 = sum2 + temp;
  }

  for (i = 0; i < dataSize; i++)
  {
    temp = yData[i];
    sum3 = sum3 + temp;
  }

  for (i = 0; i < dataSize; i++)
  {
    temp = xData[i] * xData[i];
    sum4 = sum4 + temp;
  }

  m = ((dataSize * sum1) - (sum2 * sum3)) / ((dataSize * sum4) - (sum2 * sum2));

  b = (sum3 - (m * sum2)) / dataSize;

  return 0;
}
Last edited on
Topic archived. No new replies allowed.