BorlandGeek
Programmer
I am having difficulty figuring out how to create a text file
at this point this is what im doing
TFileStream * Comm;
try
{
Comm = new TFileStream("text.txt", fmOpenReadWrite);
}
catch(...) //if the file does not exist
{
Comm = new TFileStream("text.txt", fmCreate);
}
now when i print to the file...
Comm->WriteBuffer("text", 5);
it keeps replacing all my text before, also if I add
a \r it doesnt seem to want to work as a return...
anyone got any ideas..
at this point this is what im doing
TFileStream * Comm;
try
{
Comm = new TFileStream("text.txt", fmOpenReadWrite);
}
catch(...) //if the file does not exist
{
Comm = new TFileStream("text.txt", fmCreate);
}
now when i print to the file...
Comm->WriteBuffer("text", 5);
it keeps replacing all my text before, also if I add
a \r it doesnt seem to want to work as a return...
anyone got any ideas..