Hey, i get the following annoying link errors when i try to build my program:
Compiling...
power level.cpp
Linking...
power level.obj : error LNK2001: unresolved external symbol "int __cdecl YesNo(void)" (?YesNo@@YAHXZ)
Debug/power level.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
The program compiles ok, but it wont build, for those who need to see the code, here is the snippet where YesNo is an integer:
int YesNo(), y, n, yes, no, h;
cout<<"Are you a Human? Enter y or n for yes or no."<< endl;
cin>> y, n, yes, no, YesNo();
int check;
scanf(" %c", &check);
if (check=='Y'||check=='y'||check=='yes'||check=='Yes')
{
h = z*2;
cout<<"Your human zenii reading is " << h << ".\a" << endl;
cout<< ""<< endl;
cout<<"Goodbye, " << name << "."<< endl;
cin>> quit;
system("cls");
return 0;
}
else if (check=='N'||check=='n'||check=='no'||check=='No')
cout<< ""<< endl;
cout<<"Goodbye, " << name << "."<< endl;
cin>> quit;
system("cls");
return 0;
}