template<typename T>
bool operator!=(const iterator<T>&iter, const iterator<T>&iter2)
{
return !(iter == iter2);
}
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "bool __cdecl operator!=(class iterator<int> const &,class iterator<int> const &)" (??9@YA_NABV?$iterator@H@@0@Z),该符号在函数 "public: class iterator<int> & __thiscall iterator<int>::operator=(class iterator<int> const &)" (??4?$iterator@H@@QAEAAV0@ABV0@@Z) 中被引用 Project28 C:Users苏中鹏sourcereposProject28Project28arrarList.obj 1
你返回了一个
std::ostream
。返回的时候是要发生一次拷贝的,而
std::ostream
不能拷贝。你需要返回一个引用。