P
Paul
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.
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.