linux c/c++ 获取文件大小
#include <sys/stat.h>
int FileSize(const char* fname)
{
struct stat statbuf;
if(stat(fname,&statbuf)==0)
return statbuf.st_size;
return -1;
}
linux c/c++ 获取文件大小#include <sys/stat.h>int FileSize(const char* fname){struct stat statbuf;if(stat(fname,&statbuf)==0)return statbuf.st_size;return -1;}转载于:http...
#include <sys/stat.h>
int FileSize(const char* fname)
{
struct stat statbuf;
if(stat(fname,&statbuf)==0)
return statbuf.st_size;
return -1;
}
转载于:https://www.cnblogs.com/smallredness/p/10259237.html
更多推荐
所有评论(0)