By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,947 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Dec 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Al-Burak" <ja******@netscape.net> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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?


Post the code that doesn't work.
Dec 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.