Information générale
Catégorie:
Codage, syntaxe et commandes
>Using fopen, fgets and fclose to read a file. Each record has a hex 0D, 0A at the end. The last record in the file has only a hex 1A. This is causing me trouble because the feof is not detecting eof and the fgets does not read the 0A. I end of with a blank string returned from the fgets. Any ideas how to recodnize the eof. I do not want the 1A.
>
>Brenda
How bout trying fread for the 0A and using a function that will test for the end of file. You might have to check each character this way though.
DO WHILE NOT myFEOF(cChar)
ENDDO
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement