Ukoliko ti treba samo neki prosti tekstualni file onda TStringList moze to odraditi za tebe:
Upisivanje u file-a uz pomoc TStringList:
Code:
TStringList *my_list=new TStringList;
try
{
my_list->Add("moji probni string");
my_list->Add("Jos jedan string u novom redu");
my_list->SaveToFile("c:\\test.txt");
}
__finally
{
delete my_list;
}
Ucitavanje:
Code:
TStringList *my_list=new TStringList;
try
{
my_list->LoadFromFile("c:\\test.txt");
for(int k=0;k<my_list->Count;k++)
{
ShowMessage(my_list->Strings[k]);
}
}
}
__finally
{
delete my_list;
}
People who think they know everything tend to irritate those of us who do.