Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

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

 
 
Paul
Guest
Posts: n/a
 
      06-25-2003
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.
 
Reply With Quote
 
 
 
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      06-25-2003

"MiniDisc_2k2" <(E-Mail Removed)> schrieb im Newsbeitrag
news:KMjKa.22010$(E-Mail Removed)...
[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
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

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 design@benhubbell.com 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



Advertisments