Serialize(CArchive &ar)保存数据时出错“error C2678: binary '<<' : no operator defined”??谁帮我看看。。。
if (ar.IsStoring()) {
ar << m_iControlStyle << m_iAutoControl << m_fPowerCoeff<<0xA\
<< m_fFuelTestQuantity << m_fAbsorberWaterRatio << m_sTestTime;
}
else {
ar >> m_iControlStyle >> m_iAutoControl >> m_fPowerCoeff >>0xA\
>> m_fFuelTestQuantity >> m_fAbsorberWaterRatio >> m_sTestTime;
}
编译错误为:
E:\TestBed\TestBedData.cpp(284) : error C2678: binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' (or there is no acceptable conversion)
E:\TestBed\TestBedData.cpp(289) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'const int' (or there is no acceptable conversion)