Can I serialize COleDateTime object?
-
-
write smth like it class MyClass : public CObject{ public: MyClass(); virtual ~MyClass(); virtual void Serialize(CArchive& ar); COleDateTime m_tmDate; }; ar<>m_tmDate.m_dt; ar>>(int)m_tmDate.m_status; as result: error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
-
write smth like it class MyClass : public CObject{ public: MyClass(); virtual ~MyClass(); virtual void Serialize(CArchive& ar); COleDateTime m_tmDate; }; ar<>m_tmDate.m_dt; ar>>(int)m_tmDate.m_status; as result: error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
NoName II wrote:
ar<>m_tmDate.m_dt; ar>>(int)m_tmDate.m_status;
ar<>m_tmDate;
Tell the class to do the stuff. You are trying to help too much!:)
Nibu thomas Software Developer Faqs by Michael dunn
-
NoName II wrote:
ar<>m_tmDate.m_dt; ar>>(int)m_tmDate.m_status;
ar<>m_tmDate;
Tell the class to do the stuff. You are trying to help too much!:)
Nibu thomas Software Developer Faqs by Michael dunn
what's mean "An attempt was made to access an unnamed file past its end CFile file; if(!file.Open(_T("persons.dat"),CFile::modeRead)){ AfxMessageBox(_T("Unable to open the file")); exit(-1); } CArchive arr(&file,CArchive::load); m_obDebtors.Serialize(arr); arr.Close(); file.Close();
-
NoName II wrote:
ar<>m_tmDate.m_dt; ar>>(int)m_tmDate.m_status;
ar<>m_tmDate;
Tell the class to do the stuff. You are trying to help too much!:)
Nibu thomas Software Developer Faqs by Michael dunn
what's mean "An attempt was made to access an unnamed file past its end CFile file; if(!file.Open(_T("persons.dat"),CFile::modeRead)){ AfxMessageBox(_T("Unable to open the file")); exit(-1); } CArchive arr(&file,CArchive::load); m_obDebtors.Serialize(arr); arr.Close(); file.Close();
-
what's mean "An attempt was made to access an unnamed file past its end CFile file; if(!file.Open(_T("persons.dat"),CFile::modeRead)){ AfxMessageBox(_T("Unable to open the file")); exit(-1); } CArchive arr(&file,CArchive::load); m_obDebtors.Serialize(arr); arr.Close(); file.Close();
-
what's mean "An attempt was made to access an unnamed file past its end CFile file; if(!file.Open(_T("persons.dat"),CFile::modeRead)){ AfxMessageBox(_T("Unable to open the file")); exit(-1); } CArchive arr(&file,CArchive::load); m_obDebtors.Serialize(arr); arr.Close(); file.Close();
NoName II wrote:
"An attempt was made to access an unnamed file past its end
I never heard about this error. It's perhaps because you try to load more objects than the file contains. So, you try to read after the end of the file. Can you confirm that your load and save parts serialize exactly the same objects in the same order ?