Mega Code Archive
Open a file for appending and append
#include
#include
using namespace std;
int main ()
{
char buffer[256];
fstream myfile;
//open for appending and append
myfile.open("test.txt",ios::app);
myfile << " Hey this is another line \n";
myfile.close();
return 0;
}