我查看了 MSVC 中的 CList 定义和MSDNafxtempl.h
上的文档。我没有看到定义。CList& operator=(const CList&);
我可以直接operator=
用来复制这样的 CList 对象吗?
CList<int> a = b;
或者我应该手动从目标 CList 到目标 CList 迭代源head
CList ?tail
AddTail
for(POSITION pos = a.HeadPosition(); pos; )
{
const auto& item = a.GetNext(pos);
b.AddTail(item);
}
任何建议都会有所帮助。谢谢。