|
-
Jul 8th, 2001, 06:58 PM
#1
Thread Starter
Hyperactive Member
get file size
is there a function built into C++ or in the API to determine the size of a txt file? Thanks
Matt 
-
Jul 8th, 2001, 07:16 PM
#2
you can use filelength() in io.h, but you must provide a file handle (open() the file)...
-
Jul 8th, 2001, 07:34 PM
#3
-
Jul 9th, 2001, 04:49 AM
#4
Monday Morning Lunatic
_stat is part of the standard library.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jul 9th, 2001, 05:18 AM
#5
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|