1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<int>::~queue<int>(void)" (??1?$queue@H@@QAE@XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<double>::~queue<double>(void)" (??1?$queue@N@@QAE@XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<char>::~queue<char>(void)" (??1?$queue@D@@QAE@XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::pop(void)" (?pop@?$queue@N@@QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::pop(void)" (?pop@?$queue@D@@QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::pop(void)" (?pop@?$queue@H@@QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::top(double &)" (?top@?$queue@N@@QAEHAAN@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::top(int &)" (?top@?$queue@H@@QAEHAAH@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::top(char &)" (?top@?$queue@D@@QAEHAAD@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::push(char)" (?push@?$queue@D@@QAEHD@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::push(double)" (?push@?$queue@N@@QAEHN@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::push(int)" (?push@?$queue@H@@QAEHH@Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<char>::queue<char>(void)" (??0?$queue@D@@QAE@XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<double>::queue<double>(void)" (??0?$queue@N@@QAE@XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<int>::queue<int>(void)" (??0?$queue@H@@QAE@XZ) referenced in function _main
1>C:\Users\a 2\Documents\Visual Studio 2010\Projects\temp stack\Debug\temp stack.exe : fatal error LNK1120: 15 unresolved externals
有人可以强调这些是什么类型的错误吗?
答案 0 :(得分:0)
这是链接器错误。有些代码试图调用队列类的函数,但是没有链接到可执行文件的队列类。
http://www.cprogramming.com/tutorial/compiler_linker_errors.html