C++ Language/Std/FilesystemAccess/SizeOfFile

There are two ways of measuring a file's size. Either call _filelength(), or access the st_size data member of an object returned by _fstat().

Additional information about measuring the size of a file