Hey, what I am trying to do is change the way people open text files in c++. What I want to do is:
open("example.txt");
which will then open the text file "example.txt"
and have a header file that displays like:
string line;
ifstream file ("example.txt");
if (file.is_open())
{
while (! file.eof() )
{
getline (file,line);
cout << line << endl;
}
file.close();
}
else cout << "Unable to open file";
return 0;
}
So that I do not have to type that every time I want to open a file, help please :( thank you, Phil