Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to know how to navigate in larger files.
I am using gcc, but borland C++ as well as Microsoft Visual C++(attached to Express Edition)
would be similar.

Integer type is (depending on system) only 32bit large (I can use long as well, but they are same size).
Using lseek to navigate in large files (like partition image) bigger than 4GB is impossible using 32 type.

In header file, there is defined off_t, but it is 32 bit (4 bytes long) too.
Are there any other possibilities to use lseek in that file or should I look for other methods (maybe compiler option or something I should define to get 64 bit off_t.)
(Perhaps you know any literature worth reading on this topic.)
Thanks for any answers.
Posted
Updated 8-Dec-09 14:21pm
v3

1 solution

fgetpos, fsetpos are your best bet, see, for instance [^].
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900