So here's this code :
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
mn=textBox1->Text;
MessageBox::Show(mn+" "+tsk, "Info" );
String^ fileName = "records.txt";
StreamWriter^ sw = gcnew StreamWriter("records.txt");
sw->Write(mn,tsk);
sw->Close();
}
Everytime I try to write something new into the file from the program, it just writes the new text and doesn't keep old. How can I save it, so it doesn't delete ?