Error 6
error LNK2019: unresolved external symbol "public: __thiscall Adjutancy::Adjutancy(class std::set<class Vehicle *,struct CompareCatId,class std::allocator<class Vehicle *> > *,class std::vector<class std::vector<class Distance *,class std::allocator<class Distance *> >,class std::allocator<class std::vector<class Distance *,class std::allocator<class Distance *> > > > *,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Base *,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Base *> > > *,class std::map<int,class City *,struct std::less<int>,class std::allocator<struct std::pair<int const ,class City *> > > *)" (??0Adjutancy@@QAE@PAV?$set@PAVVehicle@@UCompareCatId@@V?$allocator@PAVVehicle@@@std@@@std@@PAV?$vector@V?$vector@PAVDistance@@V?$allocator@PAVDistance@@@std@@@std@@V?$allocator@V?$vector@PAVDistance@@V?$allocator@PAVDistance@@@std@@@std@@@2@@2@PAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVBase@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVBase@@@std@@@2@@2@PAV?$map@HPAVCity@@U?$less@H@std@@V?$allocator@U?$pair@$$CBHPAVCity@@@std@@@3@@2@@Z) referenced in function "private: class Adjutancy * __thiscall Reader::ReadFromFile(char * * const)" (?ReadFromFile@Reader@@AAEPAVAdjutancy@@QAPAD@Z)
C:\Users\Roy\documents\visual studio 2010\Projects\HomeWork5\HomeWork5\Reader.obj
答案 0 :(得分:3)
Adjutancy
的构造函数未被编译。您可能没有编译源文件,或者您忘记实现此功能。
如果您想要更好的回复,请发布您的代码。
顺便说一下,有问题的构造函数的签名可能看起来像这样:
Adjutancy::Adjutancy(set<Vehicle *,CompareCatId>*,vector<vector<Distance *> >*,map<string,Base *> *,map<int,City*> *
关于你的代码大约有48件事情是绝对可怕的。
答案 1 :(得分:0)
通常,链接器错误表示其中一个(或多个):