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

A

Al-Burak

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

file.cpp: In member function `virtual jme::MyClass&
jme::MyClass::eek:perator>>(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
 
J

Jim Langston

Al-Burak said:
After storing the cursor possition in a file, I try to read it back,
std::eek:fstream >> std::streampos, but this statement gives me an error
syaing:

file.cpp: In member function `virtual jme::MyClass&
jme::MyClass::eek:perator>>(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?

Post the code that doesn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top