Hello guys i need some help,
i need a program to read a text file. I write this:
#include <iostream.h>
#include <fstream.h>
#include <cstring.h>
void main () {
int is_open;
string line;
ifstream myfile;
myfile.open ("a.txt");
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
cout << line << endl;
}
myfile.close();
}
else cout << "Unable to open file";
}
and now i have a error " 'is_open' is not a member of 'ifstream' in function main()"