개체 :을 증분 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
streampos는 스트림의 위치입니다. 스트림 오프는 그러한 위치로부터의 오프셋입니다. :-) –
@Bo : Woops가 Maxpm의 의견을 완전히 간과 해 주셔서 감사합니다. ;) – Xeo