【发布时间】:2010-05-20 13:24:08
【问题描述】:
有一个包含保存数据的成员的 Day 类。
我有一个包含 Day 对象数组的 RedBlackTree 类。
Day m_list[MAX_LIST];
上面这段代码导致了这个错误:
错误 3 错误 C2679:二进制“=”:未找到采用“const Month”类型的右侧操作数的运算符(或没有可接受的转换)c:\program files\microsoft visual studio 8\vc\包括\xutility 2949
int m_list[MAX_LIST];
当我用 Day 代替整数时,我没有收到错误。我在日间课上缺少什么。 我确实有这个运算符=
const Day & Day::operator=(Day &otherDay)
{
if(this != &otherDay) // avoid self copy
Copy(otherDay);
return *this;
}
【问题讨论】:
标签: visual-c++ compiler-errors