and save some text information to a file
My question is that:
After I execute the open picture dialog(btn_Open Picture) and open the
picture in the form, the write to file function(btn_Sa veClick) doesn't
work anymore. Every time I click the save button, nothing changed in
the file.
But before the execution of open picture, it works normally.
Why does that happen? thanks
My code:
void __fastcall TForm1::btn_Sav eClick(TObject *Sender)
{
int i;
double num[49];
ofstream outfile("Data.t xt", ios_base::app);
if (!outfile)
return;
i = 20;
outfile << i << endl;
for (i = 0; i < 49; i++)
outfile << num[i] << " ";
outfile << endl;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn_Ope nPictureClick(T Object *Sender)
{
OpenPictureDial og1->Execute();
Image1->Picture->LoadFromFile(O penPictureDialo g1-
>FileName);}
//---------------------------------------------------------------------------