C库函数表,方便查询

来源:互联网 发布:淘宝店铺被投诉怎么办 编辑:程序博客网 时间:2024/05/09 09:49

 

 

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;}


 

 

原创粉丝点击