What strategy should I use if I have an implementation of std::fstream with 32-bit std::streampos? If I want to move position I can do it in several steps(10gb - 10 times +1gb). How can I get position? Or should I keep current position in some variable outside fstream?
P.S. I can't change the implementation of STL.
Keeping track of the current position yourself is the most straight-forward answer, if you're unable to addle the STL. If your compiler support the long long
type, I'd go with that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With