I'm doing a project for my c programing class and I'm stuck I keep getting the error
Building Et156 Fitness Center.exe.
POLINK: error: Unresolved external symbol '_get_menu_choice'.
POLINK: fatal error: 1 unresolved external(s).
*** Error code: 1 ***
Done.
this is my source code
insert
Code:
#include <stdio.h>
int get_menu_choice(void);
char lname[30], fname[30];
int wgt, wst, hft, hin, age, thi, al, choice2;
float bmr, hbf;
int gender;
int choice;
float f1, f2, lbm, bfw, bfp, fatwt, leanwt;
main()
{
personal:
{
puts("Enter the last name and first name separated by spaces, then press enter.");
scanf("%s %s ", lname, fname);
printf("\nEnter your weight ");
scanf("%d", &wgt);
printf(" \n Enter your waist measuremen \nt");
scanf("%d", &wst);
printf("Enter height in feet and inches \n");
scanf("%d %d", &hft, &hin);
printf("Enter your Age \n");
scanf("%d", &age);
printf("Enter 1 for male 2 for female \n");
scanf("%d", &gender);
}
menu:
choice = get_menu_choice();
if(choice ==1)
{
f1=(wgt*1.082)+ 94.42;
f2= wst* 4.15;
lbm= f1-f2;
bfw= wgt- lbm;
bfp= (bfw* 100)/ wgt;
fatwt= wgt* bfp;
leanwt= wgt- fatwt;
}
if(choice==2)
{
if(gender== '1')
bmr= 66+(6.23* wgt) + (12.7* thi)- (6.8*age);
else
bmr=655+(4.35* wgt)+(4.7* thi)-(4.7* age);
}
if(choice==3)
{
menu2:
printf(" Active menu \n");
printf("1. Sedentary \n ");
printf("2. Moderatetely Active \n");
printf("3. Very Active \n ");
printf("Enter Choice");
scanf("%d", &choice);
if (choice== 1)
hbf=bmr* 1.2;
if(choice==2)
hbf=bmr* 1.55;
if(choice==3)
hbf=bmr* 1.725;
if(choice>3||choice<1)
{
printf("Try again \n");
goto menu2;
}
printf(" Your BMR= %f \n",bmr);
printf("Your HBF=%f \n ",hbf);
}
if(choice==4)
{
printf("\n %s %s", fname, lname);
printf("\n Your weight is %d", &wgt);
printf("\n Your height is %d ft %d in", hft, hin);
printf(" \n Your body fat percentage is %f", bfp);
printf(" Your BMR= %f \n",bmr);
printf("Your HBF=%f \n ",hbf);
printf(" \n You are %f lean " , leanwt);
printf(" \n You are %f fat \n" , fatwt );
}
if(choice==5)
goto exit;
goto menu;
exit:;
printf("\n exiting Program");
}
I've been trying to firgure it out for a couple of hours and haven't had any luck, I'm still pretty new to all of this. If any one could help I would be very thankful!