Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Input Operator >> Does not work in Visual C++ 6 (http://www.velocityreviews.com/forums/t267705-input-operator-does-not-work-in-visual-c-6-a.html)

Paul 06-25-2003 02:30 PM

Input Operator >> Does not work in Visual C++ 6
 
Hello,

I am a beginner programmer in Visual C++ 6 and have encountered a
problem.
I am trying to read from a text file in the following manner:
....
ifstream mystream;
mystream.open ("filename", ios:in);
mystream>>thedata;
....

I have checked all of my #includes and I do have fstream and iostream
yet I get the following error during compile:
"error C2678: binary '>>' : no operator defined which takes a
left-hand operand of type 'class ifstream' (or there is no acceptable
conversion)"

Here is a couple of interesting observations:
cin>>thedata; // does not compile either
however
cout<<somedata; //compiles with no problems

This is a dialog-based MFC application I am developing.

Any help on this matter would be great.
Thank you in advance,

Paul.

Karl Heinz Buchegger 06-25-2003 11:07 PM

Re: Input Operator >> Does not work in Visual C++ 6
 

"MiniDisc_2k2" <MattDelB@cox.net> schrieb im Newsbeitrag
news:KMjKa.22010$pH3.932@news2.east.cox.net...
[snip]

MiniDisc
Please refrain from MFC solutions in this newsgroup.
This NG is about standard C++ and how to use that.
No third party libraries since standard C++ is a big
enough topic on its own.

Thank you

--
Karl Heinz Buchegger
kbuchegg@gascad.at




All times are GMT. The time now is 10:24 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.