I'm writing a program and i have the following question. I'm defining a
homedirectory and logfile for my application like this
#define LOGFILE /APPHOME/applogfile /* APPHOME is the actual home
directory for the application */
But when i try to delete the old logfile and open the logfile like below, it
doesn't work (it won't access the file described as above, instead, it
creates a file LOGFILE in the directory where i run the program.
FILE *LogFile;
remove("LOGFILE"); /* First remove the old logfile */
LogFile = fopen("LOGFILE", "w");
.
.
do some stuff
.
.
fclose("LOGFILE");
What is the problem ?
De Messemaeker Johan
HEMMIS n.v.
Koning LeopoldIII-laan 2, 8500 Kortrijk
Tel.: 32 (0)56/37.26.37
Fax: 32 (0)56/37.23.24
Current Project : VMM Aalst