Get outfile size
I am using Windows 7 and want to do something like this:
1 2 3 4 5
|
//pseudocode
if (outfile.size() > some number)
do something
else
do something else
|
Of course, size() is not a member of fstream. How do I get the size of a file?
There is actually a function to get the size of a file...
1 2 3 4
|
DWORD WINAPI GetFileSize(
__in HANDLE hFile,
__out_opt LPDWORD lpFileSizeHigh
);
|
Also see: http://msdn.microsoft.com/en-us/library/aa364955(v=vs.85).aspx
After that you can execute your code above with no problems and do what it is you want to do...
Last edited on
Topic archived. No new replies allowed.