#include using namespace std; int main() { ofstream myfile; myfile.open("example.txt", ios::in | ios::app); myfile << "Сообщение\n"; myfile.close(); return 0; }