123456789
#include <fstream> using namespace std; int main() { const char filename[] = "output.txt"; ofstream out( filename, ofstream::app ); out << "Yet another line of text" << '\n'; }