TFileStream is very easy to use.
Example:
[tt]
// open files
TFileStream*infile=0,*outfile=0;
try
{
infile=new TFileStream("infile.dat",fmOpenRead);
outfile=new TFileStream("outfile.dat",fmCreate);
}
catch(...)
{
delete infile; // closes the file, doesn't delete it!
ShowMessage("Can't open files!");
Close();
}
// copy infile to outfile
const int bufsize=65536;
char*buf=new char[bufsize];
while(int bytesread=infile->Read(buf,bufsize))
outfile->Write(buf,bytesread);
// close the files, free memory
delete infile;
delete outfile;
delete[]buf;
[/tt]
-----
ALTER world DROP injustice, ADD peace;