Std :: fstream files over 2gb

What strategy should I use if I have an implementation of std :: fstream with 32-bit std :: streampos? If I want to move a position, I can do it in several steps (10gb - 10 times + 1gb). How can I get a position? Or do I need to save the current position in some variable outside of fstream?

PS I can not change the implementation of STL.

+5
source share
1 answer

Tracking your current position is the most direct answer if you cannot add STL. If your compiler supports type long long, I would go with that.

+1
source

All Articles