本文为原创文章,转载请标明
#include#include int main() { FILE *inputFile; inputFile = fopen("data.bin", "rb"); if (!inputFile) { fprintf(stderr, "Can't open bin file!"); exit(1); } fseek(inputFile, 0, SEEK_END); long inputFileLength = ftell(inputFile); printf("input file length: %ld\n", inputFileLength); fseek(inputFile, 0, SEEK_SET); fclose(inputFile); return 0;}