C库函数表,方便查询

 

 

http://www.cplusplus.com/reference/clibrary/cstdio/feof/

 

C库函数表,方便查询

示例:

/* feof example: byte counter */
#include <stdio.h>
int main ()
{
  FILE * pFile;
  long n = 0;
  pFile = fopen ("myfile.txt","rb");
  if (pFile==NULL) perror ("Error opening file");
  else
  {
    while (!feof(pFile)) {
      fgetc (pFile);
      n++;
      }
    fclose (pFile);
    printf ("Total number of bytes: %d\n", n-1);
  }
  return 0;
}


 

 

你可能感兴趣的:(C库函数表,方便查询)