I've an error and i can't understand the reason...i've an app that serialize
elements organized in records of a my-class type that contain input data from
user in a CFormView.
So if i put those records in a CObArray the serialization of the array and
related class elements contained it's ok, but if i use a CArray it's going in
this error
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
Can someone know the reason?
i defined
CObArray m_oaName and it's ok
CArray <myclass*,myclass*> m_oaName and it's going wrong
so i add dinamically object to array
CMyClass *pclass = new CMyClass();
and call serialize method of array
m_oaName.Serialize(ar)
that calls the related Serialize function in CMyClass that create the CFile
object using the ar reference with the related variables value.So i create
array of pointers to objects created dinamically and located in other memory
space.But what should difer by using CObArray or CArray with specifing
CMyClass* pointer like object ?
So i say it again it works fine only with CObArray...
the only thing i can think to solve the problem is implementing a
SerializeElements function for CArray template class...what do u think?
elements organized in records of a my-class type that contain input data from
user in a CFormView.
So if i put those records in a CObArray the serialization of the array and
related class elements contained it's ok, but if i use a CArray it's going in
this error
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
Can someone know the reason?
i defined
CObArray m_oaName and it's ok
CArray <myclass*,myclass*> m_oaName and it's going wrong
so i add dinamically object to array
CMyClass *pclass = new CMyClass();
and call serialize method of array
m_oaName.Serialize(ar)
that calls the related Serialize function in CMyClass that create the CFile
object using the ar reference with the related variables value.So i create
array of pointers to objects created dinamically and located in other memory
space.But what should difer by using CObArray or CArray with specifing
CMyClass* pointer like object ?
So i say it again it works fine only with CObArray...
the only thing i can think to solve the problem is implementing a
SerializeElements function for CArray template class...what do u think?