Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Input Operator >> Does not work in Visual C++ 6

Thread Tools

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

Posts: n/a

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

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

Here is a couple of interesting observations:
cin>>thedata; // does not compile either
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,

Reply With Quote
Karl Heinz Buchegger
Posts: n/a

"MiniDisc_2k2" <(E-Mail Removed)> schrieb im Newsbeitrag
news:KMjKa.22010$(E-Mail Removed)...

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 Removed)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
input type=file does not always work malhenry ASP .Net Web Services 1 03-01-2007 10:32 PM
Assignment operator does not work Javascript 9 11-20-2005 02:13 PM
Why does post or pre incremenent or decrement does not work inside a sizeof operator? Tarun C Programming 5 07-14-2005 03:58 PM
Webservice works once and then DOES NOT seem to work even though program does not crash Phi! ASP .Net Web Services 1 04-23-2004 08:42 AM
Subclassing UserControl makes the Visual Studio designer does not work S Guiboud ASP .Net 1 07-18-2003 03:55 PM