Welcome, Guest. Please login or register.

Author Topic: Adding to a growing file in the filesystem with C...  (Read 2448 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: Adding to a growing file in the filesystem with C...
« on: April 14, 2005, 09:15:26 PM »

You must not write to a file opened with MODE_OLDFILE. There is MODE_READWRITE for this.

if (f = Open("logfile",MODE_READWRITE))
{
Seek (f,0,OFFSET_END);
FPrintf (f,"%s\n",logmessage);
Close (f);
}

Bye,
Thomas