我試圖做這樣的事情:遞增的streampos對象
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 2011-03-31 15:06:13
streampos是流中的位置。流失是與這樣一個位置的偏移。 :-) – 2011-03-31 16:52:31
@Bo:Woops,完全忽略了Maxpm的評論,謝謝你抓住這個,馬克斯! ;) – Xeo 2011-03-31 16:55:31