I have never been able to use the remove
funtion to delete files in the builder environment.
so I have relied upon the DeleteFile function native to builder. I am writing some code that I wish to keep
strictly C++ or C and not rely upon the borland stuff.
I am looking for portablilty. could any one help me
with this code.
it always returns a -1 and does not delete the file.
thanks in advance
tomcruz.net
funtion to delete files in the builder environment.
so I have relied upon the DeleteFile function native to builder. I am writing some code that I wish to keep
strictly C++ or C and not rely upon the borland stuff.
I am looking for portablilty. could any one help me
with this code.
Code:
#include <stdio.h>
int delete_file (char *s)
{
int rtval;
rtval = remove(s);
return rtval;
}
it always returns a -1 and does not delete the file.
thanks in advance
tomcruz.net