when is calling the function i'm getting error: "
H:\workspace\HW5\HW5\Manager.obj
H:\workspace\HW5\HW5\Manager.obj> Error 22 error LNK2019: unresolved external symbol "public: void
__thiscall Shalishut::Task8_MoveVehicleFromBaseToBase(class Military *,char const *,char *,char *)" (?Task8_MoveVehicleFromBaseToBase@Shalishut@@QAEXPAVMilitary@@PBDPAD2@Z) referenced in function "public: void __thiscall Manager::TaskExecute(class Task *,class Military *,class Shalishut *,char * * const)" (?TaskExecute@Manager@@QAEXPAVTask@@PAVMilitary@@PAVShalishut@@QAPAD@Z) H:\workspace\HW5\HW5\Manager.objH:\workspace\HW5\HW5\Manager.obj
" and " Error 23 error LNK1120: 1 unresolved externals H:\workspace\HW5\Debug\HW5.exe 1 "
when i'm not calling, everything is ok and the project compiles.
thanks!
here is the calling for function:
shalishut->Task8_MoveVehicleFromBaseToBase(military,licenseId,campNameA,campNameB);
here is the function:
void Task8_MoveVehicleFromBaseToBase(Military* military,const char* licenseId,char* fromBase,char* toBase){
if (military->IsBaseExist(fromBase)){
if(military->FindBase(fromBase)->IsVehicleExist(licenseId)){
if (military->IsBaseExist(toBase)){
if(military->GetCountry()->IsRoadExist(military->FindBase(fromBase)->GetCityName(),military->FindBase(toBase)->GetCityName())){
military->FindBase(toBase)->AddVehicleToBase( military->FindBase(fromBase)->RemoveVehicleFromBase(licenseId) );
Time* time = Time::GetInstance();
long double distance = military->GetCountry()->GetRoadDistance(military->FindBase(fromBase)->GetCityName(),military->FindBase(toBase)->GetCityName());
Transport* transportToAdd = new Transport(time->GetTime(),(string)fromBase,(string)toBase,distance);
military->FindVehicle(licenseId)->AddTransport(transportToAdd);
}
}
}
}
}
H:\workspace\HW5\HW5\Manager.obj