Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个带有 32 位 std::streampos 的 std::fstream 实现,我应该使用什么策略?如果我想移动位置,我可以分几步完成(10gb - 10 次 +1gb)。我怎样才能获得职位?或者我应该将当前位置保留在 fstream 之外的某个变量中吗?
PS我不能改变STL的实现。
如果您无法添加 STL,则自己跟踪当前位置是最直接的答案。如果您的编译器支持该long long类型,我会选择它。
long long