is there a function built into C++ or in the API to determine the size of a txt file? Thanks
Printable View
is there a function built into C++ or in the API to determine the size of a txt file? Thanks
you can use filelength() in io.h, but you must provide a file handle (open() the file)...
Use the GetFileSize API
_stat is part of the standard library.
Or you can use the fseek() function with the SEEK_END paramater to move the file pointer to the end of the file and then get the pointer's position using the ftell() function. The position is the file size in bytes.