Been working on this for a while...trying to input a text file...using windows XP
ifstream newName;
ifstream newName;
newName.open("C:\blah.txt");
if (newName.is_open())
{cout << "for the love of god";}
else
{cout << "boggle";}
newName.close();
It ALWAYS evaluates to boggle. I was using
if (newName.fail())
{cout << "hrm";}
if (newName.good())
{cout << "sweet";}
else
{cout << "boggle";}
which still evaluated to boggle. I would really appreciate help with this.
I've included both fstream and iostream...I've consulted multiple books and websites about context for ifstream and what not, to no avail. If additional info is needed to diagnose this pls let me know, I've tried both absolute path and relative path for the open...Thanks for your time.