help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

operators << and >> for 'std::streampos'


From: Al-Burak
Subject: operators << and >> for 'std::streampos'
Date: 23 Dec 2005 13:20:01 -0800
User-agent: G2/0.2

After storing the cursor possition in a file, I try to read it back,
std::ofstream >> std::streampos, but this statement gives me an error
syaing:


file.cpp: In member function `virtual jme::MyClass&
jme::MyClass::operator>>(std::streampos&)':
file.cpp:1051: error: ambiguous overload for 'operator>>' in
'(((jme::Stream*)this) +
(*(int*)(((jme::MyClass*)this)->jme::MyClass::_vptr$MyClass +
-0x000000010)))->jme::Stream::f >> data'


I MUSTN'T cast std::streampos to 'int', since the size of
std::streampos will be much grater than INT_MAX.


What am I doing wrong?
What can I do to make my program to work? 


TIA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]