How to write data from a variable value to a txt file?

' AnsiString t; if (RadioButton1->Checked == true) { t = t + "text" + " "; } t->Lines->SaveToFile("1.txt"); ' 
  • The builder is not the builder. There is no difference. You need to create a stream for recording fstream type of ofstream fout ("1.txt"); after which you can either fout << t; or so fout.write (t.c_str, t.length ()). Only need then close the file - Alex.B.
  • but in general on the builder help wladm.narod.ru/Borland/filestxt.html - Alex.B
  • Can you please show me thanks to the example of my code? - Andriy Litovskiy
  • is it possible to have more code ?? this piece is not informative - Alex.B.

0