求助:无法解析的外部符号 “class std::basic_ostream...”
源代码中有
template <class T>
ostream & operator<< (ostream & output, const Array<T> & theArray)
{
for(int i=0; i<theArray.GetSize(); i++)
output << "[" << i << "]" << theArray[i] << endl;
return output;
}
编译链接时出现如下错误
001.obj : error LNK2019: 无法解析的外部符号 "class std::basic_ostream > & __cdecl operator<<(class std::basic_ostream > &,class Array const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$Array@VAnimal@@@@@Z) ,该符号在函数 _main 中被引用。
请指点