tellg() for large filesizes

  • Thread starter philippe.deneve
  • Start date
P

philippe.deneve

Hi all,

I'm trying to retrieve the filesize of a file which size is larger then
4G. Old C functions are insufficient for they return a long. The
standard c++ methods tellg() and seekg() also doesn't seem to work for
these sizes.
Do you know how I can resolve these kind of problems?

regards, Philippe.
 
G

Gianni Mariani

Hi all,

I'm trying to retrieve the filesize of a file which size is larger then
4G. Old C functions are insufficient for they return a long. The
standard c++ methods tellg() and seekg() also doesn't seem to work for
these sizes.
Do you know how I can resolve these kind of problems?

Use operating system dependant filesystem functions.
 
M

Moonlit

Hi,

Usually for 64 bit systems (I assume you are on one of those) there is
something like fstat for 64 bit. With that you should be able to get the
right file size.



--


Regards, Ron AF Greve

http://moonlit.xs4all.nl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top