I just can not understand why, if I want to know the length of the file ~ 3GB in bytes like this:
FILE * f; errno_t err = fopen_s(&f, "a.iso", "rb"); if (f == NULL) { return 0; } unsigned long int size = filelength(fileno(f)); cout << size << endl; then it gives me the maximum possible number for the type unsigned long int 4 294 967 295. With small files, everything is fine (although I use int there). The filelength function filelength declared in <io.h> .
Tell me, please, what is wrong here.