USE OF SERIALIZE FUNCTION IN DOCUMENT CLASS TO IMPLEMENT FILE
void CStoreDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
The Serialize functions is used for writing to a file or in the else part it retrieves the contents of a file.