I am a novice in c++ and I am a little confused/overwhelmed by all the different ways there are to check if a text file exists.
I have created a text file:
ofstream myfile;
myfile.open("actFile.txt");
Which I can see in the directory. But how would I use that to see if it already exists?
Would this work?
ofstream myfile;
if (myfile.good())
{
// read, write
} else
{
myfile.open("actFile.txt");
}