error LNK2019: unresolved external symbol

Hello! I am workign a project where we have to estimate the height of a child. I am trying to test my work thus far but I keep getting the same error, error LNK2019: unresolved external symbol "double __cdecl checkHeight(char,double,double)" (?checkHeight@@YANDNN@Z) referenced in function _main. I have tried several different things, but I can't seen to correct the error. If anyone knows what causes this or how I can fix it please let me know. I attached the code from main and the function. Thanks.

double checkHeight(char, double, double);

void main() {
char gender;
char h;
double motherHeight;
double fatherHeight;

cout << "Would you like to estimate the height of a male or female child? " << endl <<
"Choose m for male and f for female." ;
cin >> gender;
cout << "Choose f to enter the height in feet or i to enter the height in inches." ;
cin >> h;
cout << "Please enter the mother's height: " ;
cin >> motherHeight;
cout << "Please enter the father's height: " ;
cin >> fatherHeight;
while (gender == 'm') {
if (h == 'f') {
checkHeight(gender, motherHeight, fatherHeight);
}
}
}

double CheckHeight(char g, double mh, double fh) {
double motherHeight1 = mh;
double fatherHeight1 = fh;
double maleChildHeight1 = 0;
double femaleChildHeight1 = 0;
double childHeight = 0;
char gender1 = g;
if (gender1 == 'm') {
maleChildHeight1 = ((motherHeight1 * (13/12)) + fatherHeight1)/2;
childHeight = maleChildHeight1;
}
else if (gender1 == 'f') {
femaleChildHeight1 = ((fatherHeight1 * (12/13)) + motherHeight1)/2;
childHeight = femaleChildHeight1;
}
return childHeight;
}
When you declare your function it is `checkHeight` however when you define the function it is `CheckHeight` Case matters.


thank you so much!! I figured it was something simple I was overlooking.
Topic archived. No new replies allowed.