Link to home
Start Free TrialLog in
Avatar of mkjoshi
mkjoshi

asked on

End of file checking

HI,
 How to check the end of a file condition? I have

void CProj1Doc::Serialize(CArchive& ar)
{
      char str[100];
      if (ar.IsStoring())
      {      
      const CFile* fp = ar.GetFile();
      ar.ReadString(string);
      while (NOT_ENDOF_FILE)
      ar.Read(str,10);
                        
      }
}

Also let me know usage of ReadString instead of Read function.
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial