Hello,
I am trying to save elements into a file and it is not working. If the file is there, the new elements need to override everything in the file, pretty much clear it out and write to the file. If the file is not there, it just writes the elements to the file. I cant figure out why its not working. Thanks in advanced.
This is the section of where it is trying to save/create the file.
pfname = path + name + ".txt";
ifl.open(pfname.c_str());
if (!ifl) // --- THIS USER ID IS AVAILABLE
;
else // --- THIS USER ID IS NOT AVAILABLE
{
ifl.close();
ofl.open(pfname.c_str());
ofl << sz << graphName << endl; // --- EACH ITEM ON OWN LINE
ofl.close();
}
ofl.open(pfname.c_str());
ofl << graphName << '\n' << sz << '\n' << direct << '\n' << vert << '\n' << endl;
ofl.close();