Error 1 error LNK2019: unresolved external symbol "void __cdecl

Hi,
I am having a problem with this error message. I searched similar issues but couldnt find one that solved my problem. I am using Microsoft visual studio 2010.

This is the complete error that I get:

Error 1 error LNK2019: unresolved external symbol "void __cdecl Compute(struct incomeInfo * const,int)" (?Compute@@YAXQAUincomeInfo@@H@Z) referenced in function _main G:\C ++\Compute Income_Wells\Compute Income_Wells\compute income.obj Compute Income_Wells


Here is the code I am trying to test:

#include<string>
#include<iostream>
#include<iomanip>
#include<fstream>
#include<cstdlib>


using namespace std;

struct incomeInfo {
char id[12];
char name[30];
double pay;
double bonus;
double totPay;
};

//Function Prototypes
void getIncome(incomeInfo[],int&);
void Compute(incomeInfo[],int);
//void Display(incomeInfo[],int);


int main()
{
incomeInfo income[20];
int count = 0;

getIncome(income,count);
Compute(income,count);
//Display(income,count);
return 0;
}

void getIncome(incomeInfo income[], int &count)
{
ifstream inputFile;
char line[50];

inputFile.open("Income.txt");

if (inputFile.fail())
{
cout << "\n\n\tError opening file:" << "\n\n\t";
system("pause");
exit(1);
}
else
{
while(!inputFile.eof())
{
inputFile.getline(line,50,',');
strcpy(income[count].id, line);
inputFile.getline(line,50,',');
strcpy(income[count].name, line);
inputFile.getline(line,50,',');
income[count].pay = atof(line);
inputFile.getline(line,50,',');
income[count].bonus = 0;
inputFile.getline(line,50,',');
income[count].totPay = atof(line);

count++;


}

}
inputFile.close();

return;


}
void compute(incomeInfo income[], int count)
{
ifstream inputFile;
inputFile.open("Bonus.txt");

int bonus[20];

while(count < 20 && inputFile >> bonus[count])
{ count++;
if(atoi(income[count].id) == bonus[0])
cout << income[count].id << bonus[0];
}


}


Any assistance would be greatly appreciated.. thanks!
Function names (and pretty much everything else) are case-sensitive in C++. You have a prototype called Compute and a function call to Compute yet you have a function definition compute. You need to change the function definition compute to a capital C.
Thank you ! That was it. I cant believe I missed that!

Thanks again!
Topic archived. No new replies allowed.