Possible Duplicate:
How can I get a file's size in C?
how do I know if binary file is empty in C?
// assume file is opened as FILE *fp
fseek(fp, 0L, SEEK_END);
bool empty = ftell(fp) == 0L;
Possible Duplicate:
How can I get a file's size in C?
how do I know if binary file is empty in C?
// assume file is opened as FILE *fp
fseek(fp, 0L, SEEK_END);
bool empty = ftell(fp) == 0L;
精彩评论