Home > Back-end >  ReadString error reading file
ReadString error reading file

Time:09-20

CStdioFile file;
CFileException e;
Cstrings szTemp="", szA [1024], szB [1024], szC [1024], szD [1024].
File. Open (" D: \ \ test. TXT ", CFile: : modeCreate | CFile: : modeWrite, & amp; E);
for(int i=0; File. The ReadString (szTemp); I++)
{
//szTemp. Delete (0, szTemp. Find (" \ t ") + 1);
SzA [I]=szTemp. Mid (0, szTemp. Find (" \ t ")). The Trim ();
SzB [I]=szTemp. Mid (szTemp. Find (" \ t ") + 1, szTemp. Find (" 0000 ") + 1). The Trim ();
SzC [I]=szTemp. Mid (szTemp. Find (" 0000 ") + 1, szTemp. Find (" 0000 ") + 12). The Trim ();
SzD [I]=szTemp. Mid (szTemp. Find (szC [I]) + 1, szTemp. Find (szC [I]) + 13). The Trim ();
}
File. The Close ();


Debugging, always prompt the an unknown error occurred while accessing D: \ test. TXT

CodePudding user response:

  • Related