发布网友 发布时间:2024-10-24 04:42
共1个回答
热心网友 时间:2024-10-24 20:02
方法很多,下面是最短的
void __fastcall TForm1::Button1Click(TObject *Sender)
{
String f0="c:\\test.txt";
TStringList *ss=new TStringList;
if (FileExists(f0))
ss->LoadFromFile(f0);
ss->Append(Memo1->Text);
ss->SaveToFile(f0);
delete ss;
}