#include<string>
#include<iostream>
#include<fstream>
using namespace std;
class fileHandleString {
private:
ifstream infile;
ofstream outfile;
public:
fileHandleString() {
infile.open("input.txt", ios::in);
outfile.open("output.txt", ios::in);
}
~fileHandleString() {
infile.close();
}
string getFromFile() {
string str;
getline (outfile, str);
return (str);
}
};
The above code is what I am using but I keep getting the error found in the title. Any suggestions as I am at a loss. I've used getline plenty of times before but never really in conjunction with classes and files. Any assistance would be appreciated. Thanks.
-- Ferrari77
*/