I have searched through many pages and have yet to find an answer...
with
fstream myfile;
This snippet writes the line and works properly
myfile.open("test.txt", ios:ut);
myfile << "This is my second entry.\n";
myfile.close();
This snippet erases everything in the file (it will not append)
myfile.open("test.txt", ios::app);
myfile << "This is my second entry.\n";
myfile.close();
I understood that fstream will let you use both ifstream and ofstream functions (including append) Why does this not work?



LinkBack URL
About LinkBacks
ut);


