for (std::streampos Position = 0; Position < 123; Position++)
{
// Use Position to access something...
}
はしかし、std::streampos
がoperator++
が過負荷状態に持っていないことが表示されます。
次のエラーでPosition = (Position + 1)
結果を使用しようとすると:
ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
このため任意の回避策はあり、または私はファイルのための十分な大きさであることlong unsigned int
に頼らなければならないのですか?
ストリームオフセットとストリーム位置の違いは何ですか? – Maxpm
streamposはストリーム内の位置です。ストリームオフは、このような位置からのオフセットです。 :-) –
@Bo:WoopsはMaxpmのコメントを完全に見落としています。 ;) – Xeo