输出文件长度

来源:互联网 发布:ubuntu 禁用guest 编辑:程序博客网 时间:2024/05/21 18:45

 

 

// fopen_ex.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){  FILE * fp; int size; fp=fopen("C:\\1.bmp","r"); if(fp!=NULL) {  printf("file open success!\n");  fseek(fp,0,SEEK_END);  size=ftell(fp);  fseek(fp,0,SEEK_SET);  printf("file siez =%d\n",size);  fclose(fp); } else {  return 0;  }  return 0;}

原创粉丝点击